back off from Java 7 methods

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/functor/trunk@1541657 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/core/src/main/java/org/apache/commons/functor/range/CharacterRange.java b/core/src/main/java/org/apache/commons/functor/range/CharacterRange.java
index bd7d83c..be68867 100644
--- a/core/src/main/java/org/apache/commons/functor/range/CharacterRange.java
+++ b/core/src/main/java/org/apache/commons/functor/range/CharacterRange.java
@@ -186,7 +186,7 @@
             }
 
             public boolean hasNext() {
-                final int cmp = Integer.compare(currentValue, rightEndpoint.getValue());
+                final int cmp = Character.valueOf(currentValue).compareTo(rightEndpoint.getValue());
 
                 if (cmp == 0) {
                     return rightEndpoint.getBoundType() == BoundType.CLOSED;
diff --git a/core/src/main/java/org/apache/commons/functor/range/IntegerRange.java b/core/src/main/java/org/apache/commons/functor/range/IntegerRange.java
index 11b77cb..036b746 100644
--- a/core/src/main/java/org/apache/commons/functor/range/IntegerRange.java
+++ b/core/src/main/java/org/apache/commons/functor/range/IntegerRange.java
@@ -203,7 +203,7 @@
             }
 
             public boolean hasNext() {
-                final int cmp = Integer.compare(currentValue, rightEndpoint.getValue());
+                final int cmp = Integer.valueOf(currentValue).compareTo(rightEndpoint.getValue());
 
                 if (cmp == 0) {
                     return rightEndpoint.getBoundType() == BoundType.CLOSED;