You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2009/09/28 22:14:37 UTC

svn commit: r819703 - in /commons/proper/lang/trunk/src/java/org/apache/commons/lang: Validate.java math/NumberRange.java

Author: sebb
Date: Mon Sep 28 20:14:36 2009
New Revision: 819703

URL: http://svn.apache.org/viewvc?rev=819703&view=rev
Log:
Fixup raw types for private variables (non-API)

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberRange.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java?rev=819703&r1=819702&r2=819703&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java Mon Sep 28 20:14:36 2009
@@ -451,7 +451,7 @@
      */
     public static void noNullElements(Collection collection, String message) {
         Validate.notNull(collection);
-        for (Iterator it = collection.iterator(); it.hasNext();) {
+        for (Iterator<?> it = collection.iterator(); it.hasNext();) {
             if (it.next() == null) {
                 throw new IllegalArgumentException(message);
             }
@@ -478,7 +478,7 @@
     public static void noNullElements(Collection collection) {
         Validate.notNull(collection);
         int i = 0;
-        for (Iterator it = collection.iterator(); it.hasNext(); i++) {
+        for (Iterator<?> it = collection.iterator(); it.hasNext(); i++) {
             if (it.next() == null) {
                 throw new IllegalArgumentException("The validated collection contains null element at index: " + i);
             }
@@ -502,7 +502,7 @@
     public static void allElementsOfType(Collection collection, Class clazz, String message) {
         Validate.notNull(collection);
         Validate.notNull(clazz);
-        for (Iterator it = collection.iterator(); it.hasNext(); ) {
+        for (Iterator<?> it = collection.iterator(); it.hasNext(); ) {
             if (clazz.isInstance(it.next()) == false) {
                 throw new IllegalArgumentException(message);
             }
@@ -533,7 +533,7 @@
         Validate.notNull(collection);
         Validate.notNull(clazz);
         int i = 0;
-        for (Iterator it = collection.iterator(); it.hasNext(); i++) {
+        for (Iterator<?> it = collection.iterator(); it.hasNext(); i++) {
             if (clazz.isInstance(it.next()) == false) {
                 throw new IllegalArgumentException("The validated collection contains an element not of type "
                     + clazz.getName() + " at index: " + i);

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberRange.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberRange.java?rev=819703&r1=819702&r2=819703&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberRange.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberRange.java Mon Sep 28 20:14:36 2009
@@ -67,7 +67,7 @@
         if (num == null) {
             throw new IllegalArgumentException("The number must not be null");
         }
-        if (num instanceof Comparable == false) {
+        if (num instanceof Comparable<?> == false) {
             throw new IllegalArgumentException("The number must implement Comparable");
         }
         if (num instanceof Double && ((Double) num).isNaN()) {
@@ -106,7 +106,7 @@
         if (num1.getClass() != num2.getClass()) {
             throw new IllegalArgumentException("The numbers must be of the same type");
         }
-        if (num1 instanceof Comparable == false) {
+        if (num1 instanceof Comparable<?> == false) {
             throw new IllegalArgumentException("The numbers must implement Comparable");
         }
         if (num1 instanceof Double) {