diff options
Diffstat (limited to 'src/main/javassist')
-rw-r--r-- | src/main/javassist/compiler/MemberResolver.java | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/main/javassist/compiler/MemberResolver.java b/src/main/javassist/compiler/MemberResolver.java index c232ccda..ddbe1be4 100644 --- a/src/main/javassist/compiler/MemberResolver.java +++ b/src/main/javassist/compiler/MemberResolver.java @@ -139,30 +139,29 @@ public class MemberResolver implements TokenId { } catch (NotFoundException e) {} - if (isIntf || Modifier.isAbstract(mod)) - try { - CtClass[] ifs = clazz.getInterfaces(); - int size = ifs.length; - for (int i = 0; i < size; ++i) { - Method r = lookupMethod(ifs[i], methodName, - argTypes, argDims, argClassNames, - onlyExact); + try { + CtClass[] ifs = clazz.getInterfaces(); + int size = ifs.length; + for (int i = 0; i < size; ++i) { + Method r = lookupMethod(ifs[i], methodName, + argTypes, argDims, argClassNames, + onlyExact); + if (r != null) + return r; + } + + if (isIntf) { + // finally search java.lang.Object. + CtClass pclazz = clazz.getSuperclass(); + if (pclazz != null) { + Method r = lookupMethod(pclazz, methodName, argTypes, + argDims, argClassNames, onlyExact); if (r != null) return r; } - - if (isIntf) { - // finally search java.lang.Object. - CtClass pclazz = clazz.getSuperclass(); - if (pclazz != null) { - Method r = lookupMethod(pclazz, methodName, argTypes, - argDims, argClassNames, onlyExact); - if (r != null) - return r; - } - } } - catch (NotFoundException e) {} + } + catch (NotFoundException e) {} return maybe; } |