mirror of
https://github.com/alibaba/testable-mock.git
synced 2026-08-19 09:43:29 +08:00
fix NullPointerException when passing null as parameter of private accessor
This commit is contained in:
@@ -109,10 +109,10 @@ public class PrivateAccessor {
|
||||
}
|
||||
Class<?> commonClass = cls[0];
|
||||
for (int i = 1; i < cls.length; i++) {
|
||||
if (cls[i].isPrimitive()) {
|
||||
return null;
|
||||
} else if (cls[i] == null) {
|
||||
if (cls[i] == null) {
|
||||
continue;
|
||||
} else if (cls[i].isPrimitive()) {
|
||||
return null;
|
||||
}
|
||||
commonClass = getCommonClassOf(commonClass, cls[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user