]> source.dussan.org Git - aspectj.git/commitdiff
for 82570 - add linenumbertable for generated methods (aspectOf/etc)
authoraclement <aclement>
Tue, 16 May 2006 11:46:32 +0000 (11:46 +0000)
committeraclement <aclement>
Tue, 16 May 2006 11:46:32 +0000 (11:46 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AdviceDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java

index 0824480aaec2266bd931cc1ec4c30fc47b5b3b1f..2da558df3473d61d407dbb654be70717ffcee08f 100644 (file)
@@ -243,7 +243,7 @@ public class AdviceDeclaration extends AjMethodDeclaration {
                        codeStream.checkcast(returnType);
                }
                AstUtil.generateReturn(returnType, codeStream);
-               
+               codeStream.recordPositionsFrom(0,1);
                classFile.completeCodeAttribute(codeAttributeOffset);
                attributeNumber++;
                classFile.completeMethodInfo(methodAttributeOffset, attributeNumber);
index a28832c4ae7612513e9009ecce119c9ab49972d4..8ddcc5a611c1bdd95458da79f18d0b25b6209cce 100644 (file)
@@ -430,10 +430,10 @@ public class AspectDeclaration extends TypeDeclaration {
                MethodDeclaration md = AstUtil.makeMethodDeclaration(methodBinding);
                md.scope = initializerScope;
                codeStream.reset(md,classFile);
-               
                // body starts here
                gen.generate(codeStream);
                // body ends here
+               if (codeStream.pcToSourceMapSize==0) codeStream.recordPositionsFrom(0,1);
                classFile.completeCodeAttribute(codeAttributeOffset);
                attributeNumber++;
                classFile.completeMethodInfo(methodAttributeOffset, attributeNumber);