pixelr commented on a change in pull request #583:
URL: https://github.com/apache/commons-lang/pull/583#discussion_r456873203
##########
File path: src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
##########
@@ -782,7 +782,7 @@ private static int distance(final Class<?>[] classArray,
final Class<?>[] toClas
}
for (int offset = 0; offset < classArray.length; offset++) {
// Note InheritanceUtils.distance() uses different scoring system.
- if (classArray[offset].equals(toClassArray[offset])) {
+ if (Objects.isNull(classArray[offset]) ||
classArray[offset].equals(toClassArray[offset])) {
Review comment:
I have update the commit with suggested changes. Please have a look.
thanks !
##########
File path: src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
##########
@@ -782,7 +782,7 @@ private static int distance(final Class<?>[] classArray,
final Class<?>[] toClas
}
for (int offset = 0; offset < classArray.length; offset++) {
// Note InheritanceUtils.distance() uses different scoring system.
- if (classArray[offset].equals(toClassArray[offset])) {
+ if (Objects.isNull(classArray[offset]) ||
classArray[offset].equals(toClassArray[offset])) {
Review comment:
I have updated the commit with suggested changes. Please have a look.
thanks !
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]