Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'java'

sourceCompatibility = 1.6
sourceCompatibility = 1.7
group = 'it.tug'
version = '0.1'

Expand Down
14 changes: 7 additions & 7 deletions java/src/main/java/it/tug/Main/Formatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ public Formatter(Service service) {

public String doTheJob(String theInput) {
String response = service.askForPermission();
if (response == "FAIL") {
return "error";
} else if (response == "OK") {
return String.format("%s%s", theInput, theInput);
} else {
return null;
switch (response) {
case "FAIL":
return "error";
case "OK":
return String.format("%s%s", theInput, theInput);
default:
return null;
}
}

}