Properly return null as default constructor of an array.
Patch from Christophe Foket on the mailing list.
This commit is contained in:
parent
1d06b2f764
commit
ec8a0f1294
|
@ -145,7 +145,7 @@ public class ClassNewInstanceContextInterpreter extends AbstractReflectionInterp
|
|||
|
||||
private IMethod getPublicDefaultCtor(IClass klass) {
|
||||
IMethod ctorMethod = klass.getMethod(defCtorSelector);
|
||||
if (ctorMethod != null && ctorMethod.isPublic()) {
|
||||
if (ctorMethod != null && ctorMethod.isPublic() && ctorMethod.getDeclaringClass() == klass) {
|
||||
return ctorMethod;
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue