From 66b79d98f7014a811c12a3ab2ea313fb47605a32 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Mon, 7 Mar 2016 17:06:56 +0100 Subject: Fix non-sense non-empty null check --- src/ch/epfl/xblast/server/Bomb.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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 { public Bomb(PlayerID ownerId, Cell position, Sq fuseLengths, int range) { this.ownerId = Objects.requireNonNull(ownerId); this.position = Objects.requireNonNull(position); - if (fuseLengths.isEmpty()) { + + this.fuseLengths = Objects.requireNonNull(fuseLengths); + if (this.fuseLengths.isEmpty()) throw new IllegalArgumentException(); - } else { - this.fuseLengths = Objects.requireNonNull(fuseLengths); - } + this.range = ArgumentChecker.requireNonNegative(range); } -- cgit v1.2.3