Exception:
testToClass_object(org.apache.commons.lang3.ClassUtilsTest) Time elapsed: 0.016 sec <<< ERROR!
java.lang.NullPointerException: null
at org.apache.commons.lang3.ClassUtils.toClass(ClassUtils.java:910)
at org.apache.commons.lang3.ClassUtilsTest.testToClass_object(ClassUtilsTest.java:901)
Fix Commit: SVN Revision 907102
The test has been modified: the assertEquals(Arrays.equals(...))
(equivalent to assertArrayEquals
) has been removed.
Class<?>[] classes = new Class[array.length];
for (int i = 0; i < array.length; i++) {
- classes[i] = array[i].getClass();
+ classes[i] = array[i] == null ? null : array[i].getClass();
}
return classes;