]> source.dussan.org Git - aspectj.git/commitdiff
optimization: if forcing a public type public, dont consider it a change!
authoraclement <aclement>
Tue, 27 Feb 2007 13:30:51 +0000 (13:30 +0000)
committeraclement <aclement>
Tue, 27 Feb 2007 13:30:51 +0000 (13:30 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java

index 0a392cc26874e1f9b915db19816c126a8c099806..016bf8a683e2c69ba45a37177a9ac30d487b6882 100644 (file)
@@ -520,8 +520,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger {
                                return true;
                                //throw new BCException("no match for " + member + " in " + gen);
                        } else if (member.getKind() == Member.STATIC_INITIALIZATION) {
-                               gen.forcePublic();
-                               return true;
+                               return gen.forcePublic();
                        } else {
                                throw new RuntimeException("unimplemented");
                        }
index 6f6743f4716beeed95d73f52e9e3bd8b9dd4b561..8f414f8483f3f6ecaab154275843c5273806c9fa 100644 (file)
@@ -1321,8 +1321,10 @@ public final class LazyClassGen {
        }
        
        
-       public void forcePublic() {
+       public boolean forcePublic() {
+               if (myGen.isPublic()) return false;
                myGen.setAccessFlags(Utility.makePublic(myGen.getAccessFlags()));
+               return true;
        }