Fixup raw types for private variables (non-API)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@819703 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-09-28 20:14:36 +00:00
parent e6c395c5d8
commit 826adcfbaf
2 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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) {