BAEL-8219 Fix tests for core-java, maven and core-java-io projects

-Test fixes
This commit is contained in:
Dhawal Kapil
2018-08-15 14:14:50 +05:30
parent 7c94023486
commit 3b64d8ef4e
8 changed files with 158 additions and 143 deletions
@@ -25,11 +25,7 @@ public class Exceptions {
}
public List<Player> loadAllPlayers(String playersFile) throws IOException{
try {
throw new IOException();
} catch(IOException ex) {
throw new IllegalStateException();
}
throw new IOException();
}
public int getPlayerScoreThrows(String playerFile) throws FileNotFoundException {
@@ -163,14 +159,8 @@ public class Exceptions {
}
}
public void throwAsGotoAntiPattern() {
try {
// bunch of code
throw new MyException();
// second bunch of code
} catch ( MyException e ) {
// third bunch of code
}
public void throwAsGotoAntiPattern() throws MyException {
throw new MyException();
}
public int getPlayerScoreSwallowingExceptionAntiPattern(String playerFile) {