aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/com/jogamp/common/util/VersionNumber.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/com/jogamp/common/util/VersionNumber.java b/src/java/com/jogamp/common/util/VersionNumber.java
index 8c997e6..f0ba820 100644
--- a/src/java/com/jogamp/common/util/VersionNumber.java
+++ b/src/java/com/jogamp/common/util/VersionNumber.java
@@ -54,9 +54,11 @@ public class VersionNumber implements Comparable {
}
public final int compareTo(Object o) {
- if( ! ( o instanceof VersionNumber ) ) {
- return -1;
+ if ( ! ( o instanceof VersionNumber ) ) {
+ Class c = (null != o) ? o.getClass() : null ;
+ throw new ClassCastException("Not a Capabilities object: " + c);
}
+
VersionNumber vo = (VersionNumber) o;
if (major > vo.major) {
return 1;