Skip to content

Commit

Permalink
Trivial tweak: set initial capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellansun committed Jan 11, 2025
1 parent 1ad6b08 commit 651600b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ public Object chooseMethod(final Class[] arguments, final boolean coerce) {
return MetaClassHelper.chooseMostGeneralMethodWith1NullParam(methods);
} else {
final Object[] data = methods.getArray();
final int length = data.length;
List matchingMethods = new ArrayList(length);
for (int i = 0; i < length; i += 1) {
final int methodCount = methods.size();
List matchingMethods = new ArrayList(methodCount);
for (int i = 0; i < methodCount; i += 1) {
Object method = data[i];

// making this false helps find matches
Expand Down

0 comments on commit 651600b

Please sign in to comment.