We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff499da commit 3f029c9Copy full SHA for 3f029c9
src/main/java/org/scijava/util/Types.java
@@ -374,7 +374,13 @@ public static Type array(final Type componentType) {
374
* Gets the component type of the given array type, or null if not an array.
375
*/
376
public static Type component(final Type type) {
377
- return GenericTypeReflector.getArrayComponentType(type);
+ if (type instanceof Class) {
378
+ return ((Class<?>) type).getComponentType();
379
+ }
380
+ if (type instanceof GenericArrayType) {
381
+ return ((GenericArrayType) type).getGenericComponentType();
382
383
+ return null;
384
}
385
386
/**
0 commit comments