diff --git a/project.xml b/project.xml
index 1f3160863..a161f602f 100644
--- a/project.xml
+++ b/project.xml
@@ -273,6 +273,9 @@ limitations under the License.
Converts the specified primitive Class object to its corresponding * wrapper Class object.
+ * + *NOTE: From v2.2, this method handles Void.TYPE
,
+ * returning Void.TYPE
.
cls
or cls
if
diff --git a/src/test/org/apache/commons/lang/ClassUtilsTest.java b/src/test/org/apache/commons/lang/ClassUtilsTest.java
index f1f05da6f..31ca69455 100644
--- a/src/test/org/apache/commons/lang/ClassUtilsTest.java
+++ b/src/test/org/apache/commons/lang/ClassUtilsTest.java
@@ -352,6 +352,8 @@ public class ClassUtilsTest extends TestCase {
assertEquals("ClassUtils.class -> ClassUtils.class",
org.apache.commons.lang.ClassUtils.class,
ClassUtils.primitiveToWrapper(org.apache.commons.lang.ClassUtils.class));
+ assertEquals("Void.TYPE -> Void.TYPE",
+ Void.TYPE, ClassUtils.primitiveToWrapper(Void.TYPE));
// test null
assertNull("null -> null",
@@ -384,7 +386,7 @@ public class ClassUtilsTest extends TestCase {
// test an array of no primitive classes
final Class[] noPrimitives = new Class[] {
- String.class, ClassUtils.class
+ String.class, ClassUtils.class, Void.TYPE
};
// This used to return the exact same array, but no longer does.
assertNotSame("unmodified", noPrimitives, ClassUtils.primitivesToWrappers(noPrimitives));