diff options
author | Julien Gouesse <[email protected]> | 2018-07-14 14:17:22 +0200 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2018-07-14 14:17:22 +0200 |
commit | 518ae86b33d0127abb9b7cd36644e7d56e8712a0 (patch) | |
tree | c8420e52525201bf84d850bdc3a79e86ca0e32ac /ardor3d-core | |
parent | b4719060fa6c2040ae09cb92e6403755e7aec6ea (diff) |
Replaces Guava's checkArgument
Diffstat (limited to 'ardor3d-core')
-rw-r--r-- | ardor3d-core/src/main/java/com/ardor3d/input/MouseCursor.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ardor3d-core/src/main/java/com/ardor3d/input/MouseCursor.java b/ardor3d-core/src/main/java/com/ardor3d/input/MouseCursor.java index e7fbf20..6e25a9d 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/input/MouseCursor.java +++ b/ardor3d-core/src/main/java/com/ardor3d/input/MouseCursor.java @@ -10,8 +10,6 @@ package com.ardor3d.input; -import static com.google.common.base.Preconditions.checkArgument; - import java.util.Objects; import com.ardor3d.annotation.Immutable; @@ -58,10 +56,14 @@ public class MouseCursor { _hotspotX = hotspotX; _hotspotY = hotspotY; - checkArgument(hotspotX >= 0 && hotspotX < image.getWidth(), - "hotspot X is out of bounds: 0 <= %s < " + image.getWidth(), hotspotX); - checkArgument(hotspotY >= 0 && hotspotY < image.getHeight(), - "hotspot Y is out of bounds: 0 <= %s < " + image.getHeight(), hotspotY); + if (!(hotspotX >= 0 && hotspotX < image.getWidth())) { + throw new IllegalArgumentException( + "hotspot X is out of bounds: 0 <= " + hotspotX + " < " + image.getWidth()); + } + if (!(hotspotY >= 0 && hotspotY < image.getHeight())) { + throw new IllegalArgumentException( + "hotspot Y is out of bounds: 0 <= " + hotspotY + " < " + image.getHeight()); + } } public String getName() { |