garydgregory commented on PR #1861: URL: https://github.com/apache/commons-lang/pull/1861#issuecomment-6884952578
@Alwaysgaurav1 Thanks for the fix. Two issues are in this PR, so I created and merged PR #1870: - `getMatchingAccessibleMethod()` still uses the original `requestTypes` array after candidate selection. For a method such as `public void call(String... args)`, passing `(Class<?>[]) null` now passes candidate matching but throws at `requestTypes.length`. I normalized the array in getMatchingAccessibleMethod() and used it throughout. - The tests in this PR do not exercise the new normalization in `getTotalTransformationCost()`. There is a related pre-existing gap in `getMatchingMethod(): getMatchingMethod(String.class, "length", (Class<?>[]) null) throws in distance(), whereas an empty array succeeds. That entry point also needed normalization. Finally, the description attributes the NPE to #1828, but the preceding implementation also dereferenced parameterTypes.length inside its varargs loops. That change moved the failure earlier rather than introducing it. Closing, you are credited in `changes.xml`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
