From 518ae86b33d0127abb9b7cd36644e7d56e8712a0 Mon Sep 17 00:00:00 2001 From: Julien Gouesse Date: Sat, 14 Jul 2018 14:17:22 +0200 Subject: Replaces Guava's checkArgument --- .../src/main/java/com/ardor3d/input/MouseCursor.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'ardor3d-core') 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() { -- cgit v1.2.3