aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-core
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2018-07-14 14:17:22 +0200
committerJulien Gouesse <[email protected]>2018-07-14 14:17:22 +0200
commit518ae86b33d0127abb9b7cd36644e7d56e8712a0 (patch)
treec8420e52525201bf84d850bdc3a79e86ca0e32ac /ardor3d-core
parentb4719060fa6c2040ae09cb92e6403755e7aec6ea (diff)
Replaces Guava's checkArgument
Diffstat (limited to 'ardor3d-core')
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/input/MouseCursor.java14
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() {