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 0bd13c3 commit 1ad6b08
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@ public Object chooseMethod(final Class[] arguments, final boolean coerce) {
} else if (arguments.length == 1 && arguments[0] == null) {
return MetaClassHelper.chooseMostGeneralMethodWith1NullParam(methods);
} else {
List matchingMethods = new ArrayList();
final Object[] data = methods.getArray();
for (int i = 0, n = methods.size(); i < n; i += 1) {
final int length = data.length;
List matchingMethods = new ArrayList(length);
for (int i = 0; i < length; i += 1) {
Object method = data[i];

// making this false helps find matches
Expand Down

0 comments on commit 1ad6b08

Please sign in to comment.