Skip to content

Commit fcdb910

Browse files
committed
Set Java 7 as source and compilation target
1 parent 464808b commit fcdb910

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

HackPackage/src/main/java/Hack/Controller/HackController.java

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,8 @@ public HackController(HackSimulator simulator, String scriptFileName) {
246246
try {
247247
loadNewScript(file, false);
248248
saveWorkingDir(file);
249-
} catch (ScriptException se) {
249+
} catch (ScriptException | ControllerException se) {
250250
displayMessage(se.getMessage(), true);
251-
} catch (ControllerException ce) {
252-
displayMessage(ce.getMessage(), true);
253251
}
254252

255253
fastForwardRunning = true;
@@ -450,14 +448,8 @@ else if (breakpoint.isReached()) {
450448
if (breakpointReached)
451449
tempBreakpoints.clear();
452450

453-
} catch (ControllerException ce) {
451+
} catch (ControllerException | ProgramException | CommandException | VariableException ce) {
454452
stopWithError(ce);
455-
} catch (ProgramException pe) {
456-
stopWithError(pe);
457-
} catch (CommandException ce) {
458-
stopWithError(ce);
459-
} catch (VariableException ve) {
460-
stopWithError(ve);
461453
}
462454

463455
singleStepLocked = false;
@@ -913,8 +905,7 @@ protected void reloadDefaultScript() {
913905
try {
914906
loadNewScript(defaultScriptFile, false);
915907
rewind();
916-
} catch (ScriptException ignored) {
917-
} catch (ControllerException ignored) {
908+
} catch (ScriptException | ControllerException ignored) {
918909
}
919910
}
920911
}
@@ -1070,10 +1061,7 @@ public void actionPerformed(ControllerEvent event) {
10701061
doUnknownAction(event.getAction(), event.getData());
10711062
break;
10721063
}
1073-
} catch (ScriptException e) {
1074-
displayMessage(e.getMessage(), true);
1075-
stopMode();
1076-
} catch (ControllerException e) {
1064+
} catch (ScriptException | ControllerException e) {
10771065
displayMessage(e.getMessage(), true);
10781066
stopMode();
10791067
}

pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@
3030

3131
<build>
3232
<plugins>
33+
<plugin>
34+
<artifactId>maven-compiler-plugin</artifactId>
35+
<version>3.5</version>
36+
<configuration>
37+
<source>1.7</source>
38+
<target>1.7</target>
39+
</configuration>
40+
</plugin>
41+
3342
<plugin>
3443
<groupId>pl.project13.maven</groupId>
3544
<artifactId>git-commit-id-plugin</artifactId>

0 commit comments

Comments
 (0)