diff options
author | Pacien TRAN-GIRARD | 2016-03-07 17:06:56 +0100 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2016-03-07 17:06:56 +0100 |
commit | 66b79d98f7014a811c12a3ab2ea313fb47605a32 (patch) | |
tree | d66b72d9e903f12276fe0510c5146c0b1b7fdaef /src | |
parent | bccd4e10938c55f9b30283338120689ea2e1738e (diff) | |
download | xblast-66b79d98f7014a811c12a3ab2ea313fb47605a32.tar.gz |
Fix non-sense non-empty null check
Diffstat (limited to 'src')
-rw-r--r-- | src/ch/epfl/xblast/server/Bomb.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ch/epfl/xblast/server/Bomb.java b/src/ch/epfl/xblast/server/Bomb.java index 659adb6..4b89752 100644 --- a/src/ch/epfl/xblast/server/Bomb.java +++ b/src/ch/epfl/xblast/server/Bomb.java | |||
@@ -42,11 +42,11 @@ public final class Bomb { | |||
42 | public Bomb(PlayerID ownerId, Cell position, Sq<Integer> fuseLengths, int range) { | 42 | public Bomb(PlayerID ownerId, Cell position, Sq<Integer> fuseLengths, int range) { |
43 | this.ownerId = Objects.requireNonNull(ownerId); | 43 | this.ownerId = Objects.requireNonNull(ownerId); |
44 | this.position = Objects.requireNonNull(position); | 44 | this.position = Objects.requireNonNull(position); |
45 | if (fuseLengths.isEmpty()) { | 45 | |
46 | this.fuseLengths = Objects.requireNonNull(fuseLengths); | ||
47 | if (this.fuseLengths.isEmpty()) | ||
46 | throw new IllegalArgumentException(); | 48 | throw new IllegalArgumentException(); |
47 | } else { | 49 | |
48 | this.fuseLengths = Objects.requireNonNull(fuseLengths); | ||
49 | } | ||
50 | this.range = ArgumentChecker.requireNonNegative(range); | 50 | this.range = ArgumentChecker.requireNonNegative(range); |
51 | } | 51 | } |
52 | 52 | ||