diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/luxons/sevenwonders/repositories/GameRepository.java | 2 | ||||
-rw-r--r-- | src/main/java/org/luxons/sevenwonders/validation/DestinationAccessValidator.java | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/repositories/GameRepository.java b/src/main/java/org/luxons/sevenwonders/repositories/GameRepository.java index 0e0f6db8..59e984af 100644 --- a/src/main/java/org/luxons/sevenwonders/repositories/GameRepository.java +++ b/src/main/java/org/luxons/sevenwonders/repositories/GameRepository.java @@ -27,7 +27,7 @@ public class GameRepository { return game; } - private static class GameNotFoundException extends ApiMisuseException { + public static class GameNotFoundException extends ApiMisuseException { GameNotFoundException(long id) { super("Game " + id + " doesn't exist"); } diff --git a/src/main/java/org/luxons/sevenwonders/validation/DestinationAccessValidator.java b/src/main/java/org/luxons/sevenwonders/validation/DestinationAccessValidator.java index bc7e52ce..64f14dee 100644 --- a/src/main/java/org/luxons/sevenwonders/validation/DestinationAccessValidator.java +++ b/src/main/java/org/luxons/sevenwonders/validation/DestinationAccessValidator.java @@ -71,9 +71,6 @@ public class DestinationAccessValidator { private static int extractId(Matcher matcher) { String id = matcher.group("id"); - if (id == null) { - throw new IllegalArgumentException("No id matched in the destination"); - } return Integer.parseInt(id); } } |