Skip to content

Commit

Permalink
optimize ArrayType creation for multidimensional arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
esaulpaugh committed Feb 1, 2024
1 parent c97ba0e commit 8a72a79
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/com/esaulpaugh/headlong/abi/ArrayType.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,8 @@ Class<?> arrayClass() {
if(arrayClass != null) {
return arrayClass;
}
try {
return Class.forName('[' + clazz.getName(), false, CLASS_LOADER);
} catch (ClassNotFoundException cnfe) {
throw new AssertionError(cnfe);
}
return Array.newInstance(clazz, 0)
.getClass();
}

@Override
Expand Down

0 comments on commit 8a72a79

Please sign in to comment.