]> source.dussan.org Git - aspectj.git/commitdiff
307120: field accesses in itds of private fields
authoraclement <aclement>
Mon, 5 Apr 2010 19:08:39 +0000 (19:08 +0000)
committeraclement <aclement>
Mon, 5 Apr 2010 19:08:39 +0000 (19:08 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/PrivilegedHandler.java

index 62ea86f055588c0630416fbd2aee41d6453c4954..bf7aaed0fa1680f4153e7325b828eef95080e4af 100644 (file)
@@ -31,8 +31,6 @@ import org.aspectj.weaver.AjcMemberMaker;
 import org.aspectj.weaver.Lint;
 import org.aspectj.weaver.Member;
 import org.aspectj.weaver.PrivilegedAccessMunger;
-import org.aspectj.weaver.ReferenceType;
-import org.aspectj.weaver.ReferenceTypeDelegate;
 import org.aspectj.weaver.ResolvedMember;
 import org.aspectj.weaver.ResolvedMemberImpl;
 import org.aspectj.weaver.ResolvedType;
@@ -68,11 +66,12 @@ public class PrivilegedHandler implements IPrivilegedHandler {
                        accessors.put(key, ret);
                // 307120
                ResolvedType rt = inAspect.factory.fromEclipse(baseField.declaringClass);
-               if (rt!=null) {
-                       ReferenceTypeDelegate rtd = ((ReferenceType)rt).getDelegate();
-                       if (rtd instanceof EclipseSourceType) {
-                               rt.addInterTypeMunger(new EclipseTypeMunger(inAspect.factory,new PrivilegedAccessMunger(key, true),inAspect.typeX,null), true);
-                       }
+               if (rt != null) {
+                       // ReferenceTypeDelegate rtd = ((ReferenceType) rt).getDelegate();
+                       // if (rtd instanceof EclipseSourceType) {
+                       rt.addInterTypeMunger(new EclipseTypeMunger(inAspect.factory, new PrivilegedAccessMunger(key, true), inAspect.typeX,
+                                       null), true);
+                       // }
                }
                return ret;
        }
@@ -101,15 +100,16 @@ public class PrivilegedHandler implements IPrivilegedHandler {
                }
                checkWeaveAccess(key.getDeclaringType(), location);
                accessors.put(key, ret);
-//             if (!baseMethod.isConstructor()) {
-//                     ResolvedType rt = inAspect.factory.fromEclipse(baseMethod.declaringClass);
-//                     if (rt!=null) {
-//                             ReferenceTypeDelegate rtd = ((ReferenceType)rt).getDelegate();
-//                             if (rtd instanceof EclipseSourceType) {
-//                                     rt.addInterTypeMunger(new EclipseTypeMunger(inAspect.factory,new PrivilegedAccessMunger(key, true),inAspect.typeX,null), true);
-//                             }
-//                     }
-//             }
+               // if (!baseMethod.isConstructor()) {
+               // ResolvedType rt = inAspect.factory.fromEclipse(baseMethod.declaringClass);
+               // if (rt!=null) {
+               // ReferenceTypeDelegate rtd = ((ReferenceType)rt).getDelegate();
+               // if (rtd instanceof EclipseSourceType) {
+               // rt.addInterTypeMunger(new EclipseTypeMunger(inAspect.factory,new PrivilegedAccessMunger(key, true),inAspect.typeX,null),
+               // true);
+               // }
+               // }
+               // }
                return ret;
        }