Skip to content
Snippets Groups Projects
Commit 948ecc69 authored by Martin Dolmen Helmersen's avatar Martin Dolmen Helmersen
Browse files

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/java/resources/CalculatorResource.java
parents 414d0644 a5db6380
No related branches found
No related tags found
No related merge requests found
package resources; package resources;
<<<<<<< HEAD
import org.graalvm.compiler.hotspot.stubs.DivisionByZeroExceptionStub;
=======
>>>>>>> 2ffc5ca1cddf44a1e6d380f18eb4b10bb4578efb
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.POST; import javax.ws.rs.POST;
import javax.ws.rs.Path; import javax.ws.rs.Path;
...@@ -16,7 +11,6 @@ import javax.ws.rs.core.MediaType; ...@@ -16,7 +11,6 @@ import javax.ws.rs.core.MediaType;
*/ */
@Path("/calculator") @Path("/calculator")
public class CalculatorResource { public class CalculatorResource {
/** /**
* Method handling HTTP POST requests. The calculated answer to the expression will be sent to the client as * Method handling HTTP POST requests. The calculated answer to the expression will be sent to the client as
* plain/text. * plain/text.
...@@ -51,7 +45,7 @@ public int calculate(String expression) { ...@@ -51,7 +45,7 @@ public int calculate(String expression) {
return result; return result;
} }
//Multiplication
public int multiplication(String equation) { public int multiplication(String equation) {
String[] split = equation.split("[*]"); String[] split = equation.split("[*]");
int sum = Integer.parseInt(split[0]); int sum = Integer.parseInt(split[0]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment