]> source.dussan.org Git - aspectj.git/commitdiff
test and fix for 119451
authoraclement <aclement>
Fri, 9 Dec 2005 10:32:57 +0000 (10:32 +0000)
committeraclement <aclement>
Fri, 9 Dec 2005 10:32:57 +0000 (10:32 +0000)
ajde/testsrc/org/aspectj/ajde/AsmDeclarationsTest.java
ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java

index e374ba5cd742bcea9d195d2d17407c5fed975f3b..1925ea02b02fbce82b174c82b5c2f5af666349dd 100644 (file)
@@ -35,6 +35,7 @@ public class AsmDeclarationsTest extends AjdeTestCase {
                IProgramElement packageAspect = AsmManager.getDefault().getHierarchy().findElementForType(null, "AdviceNamingCoverage");
                assertNotNull(packageAspect);
                assertEquals(IProgramElement.Accessibility.PACKAGE, packageAspect.getAccessibility());
+               assertEquals("aspect should not have public in it's signature","aspect AdviceNamingCoverage",packageAspect.getSourceSignature());
        }
        
        public void testStaticModifiers() {
index c22906558edbbf61eb926634749242d202753ebc..b30c40173b80be4a64b3564fe05feb50f3721b7a 100644 (file)
@@ -165,7 +165,7 @@ class StubFileGenerator{
        String signature = classNode.getSourceSignature();
                if (signature != null){
                        int index = signature.indexOf("aspect");
-                       if (index != -1 && signature.charAt(index-1) != '.') {
+                       if (index == 0 || (index != -1 && signature.charAt(index-1) != '.') ) {
                                signature = signature.substring(0, index) +
                                "class " +
                                signature.substring(index + 6, signature.length());
index 9c683d7d7fc09b210ae8a8aade6e607b4a026608..87dc148680dce86c10946609ec5861cad7f61765 100644 (file)
@@ -1113,7 +1113,9 @@ public class AspectDeclaration extends TypeDeclaration {
 //     }
 
        public StringBuffer printHeader(int indent, StringBuffer output) {
-               printModifiers(this.modifiers, output);
+               // since all aspects are made public we want to print the
+               // modifiers that were supplied in the original source code
+               printModifiers(this.declaredModifiers,output);
                output.append("aspect " ); 
                output.append(name);
                if (superclass != null) {