diff --git a/src/java/org/apache/commons/lang/Validate.java b/src/java/org/apache/commons/lang/Validate.java index d5d14597e..a565da3f4 100644 --- a/src/java/org/apache/commons/lang/Validate.java +++ b/src/java/org/apache/commons/lang/Validate.java @@ -451,7 +451,7 @@ public static void noNullElements(Object[] array) { */ 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, String message) { 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 noNullElements(Collection collection) { 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 @@ public static void allElementsOfType(Collection collection, Class clazz) { 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); diff --git a/src/java/org/apache/commons/lang/math/NumberRange.java b/src/java/org/apache/commons/lang/math/NumberRange.java index beff6f8f3..64f4e9160 100644 --- a/src/java/org/apache/commons/lang/math/NumberRange.java +++ b/src/java/org/apache/commons/lang/math/NumberRange.java @@ -67,7 +67,7 @@ public NumberRange(Number num) { 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 @@ public NumberRange(Number num1, Number num2) { 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) {