]> source.dussan.org Git - aspectj.git/commitdiff
364380
authoraclement <aclement>
Tue, 22 Nov 2011 19:32:01 +0000 (19:32 +0000)
committeraclement <aclement>
Tue, 22 Nov 2011 19:32:01 +0000 (19:32 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMemberImpl.java

index 38098eb80460da08b5441671b49a0e0abb47eed8..0f82f045f547741c6077835dafad55f2366c21a8 100644 (file)
@@ -673,8 +673,15 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Reso
        }
 
        public boolean isVisible(ResolvedType fromType) {
-               World world = fromType.getWorld();
-               return ResolvedType.isVisible(getModifiers(), getDeclaringType().resolve(world), fromType);
+               UnresolvedType declaringType = getDeclaringType();
+               ResolvedType type = null;
+               if (fromType.equals(declaringType)) {
+                       type = fromType;
+               } else {
+                       World world = fromType.getWorld();
+                       type = declaringType.resolve(world);
+               }
+               return ResolvedType.isVisible(getModifiers(), type, fromType);
        }
 
        public void setCheckedExceptions(UnresolvedType[] checkedExceptions) {