@@ -418,9 +418,9 @@ public static boolean isMultidimensionalArray(Object obj) {
418
418
* supplied target type for the purpose of reflective method invocations.
419
419
*
420
420
* <p>In contrast to {@link Class#isAssignableFrom(Class)}, this method
421
- * returns {@code true} if the target type represents a primitive type whose
422
- * wrapper matches the supplied source type. In addition, this method
423
- * also supports
421
+ * returns {@code true} if the target type represents a primitive type (or
422
+ * {@code void}) whose wrapper matches the supplied source type. In addition,
423
+ * this method also supports
424
424
* <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-5.html#jls-5.1.2">
425
425
* widening conversions</a> for primitive target types.
426
426
*
@@ -454,8 +454,8 @@ public static boolean isAssignableTo(Class<?> sourceType, Class<?> targetType) {
454
454
* type for the purpose of reflective method invocations.
455
455
*
456
456
* <p>In contrast to {@link Class#isInstance(Object)}, this method returns
457
- * {@code true} if the target type represents a primitive type whose
458
- * wrapper matches the supplied object's type. In addition, this method
457
+ * {@code true} if the target type represents a primitive type (or {@code void})
458
+ * whose wrapper matches the supplied object's type. In addition, this method
459
459
* also supports
460
460
* <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-5.html#jls-5.1.2">
461
461
* widening conversions</a> for primitive types and their corresponding
@@ -550,11 +550,12 @@ static boolean isWideningConversion(Class<?> sourceType, Class<?> targetType) {
550
550
}
551
551
552
552
/**
553
- * Get the wrapper type for the supplied primitive type.
553
+ * Get the wrapper type for the supplied primitive type (or {@code void}) .
554
554
*
555
- * @param type the primitive type for which to retrieve the wrapper type
555
+ * @param type the primitive type (or {@code void}) for which to retrieve the
556
+ * wrapper type
556
557
* @return the corresponding wrapper type or {@code null} if the
557
- * supplied type is {@code null} or not a primitive type
558
+ * supplied type is {@code null} or not a primitive type or {@code void}
558
559
*/
559
560
public static Class <?> getWrapperType (Class <?> type ) {
560
561
return primitiveToWrapperMap .get (type );
0 commit comments