Skip to content

Commit a95c5fb

Browse files
committed
Types: use array(Type) method as appropriate
1 parent c08cb96 commit a95c5fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/scijava/util/Types.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,8 +2146,8 @@ public static Class<?> getRawType(final Type type,
21462146
final Class<?> rawComponentType = getRawType(((GenericArrayType) type)
21472147
.getGenericComponentType(), assigningType);
21482148

2149-
// create array type from raw component type and return its class
2150-
return Array.newInstance(rawComponentType, 0).getClass();
2149+
// return the corresponding array type
2150+
return array(rawComponentType);
21512151
}
21522152

21532153
// (hand-waving) this is not the method you're looking for

0 commit comments

Comments
 (0)