diff options
author | mkersten <mkersten> | 2003-07-30 09:54:07 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2003-07-30 09:54:07 +0000 |
commit | f5d31bac784ae2c0cccb6a990d1fc54e86df2dd1 (patch) | |
tree | 658969bd041f68027e174e2e543b9bb9e177c4a3 /org.aspectj.ajdt.core | |
parent | 78869703a8bf08bfa4e8f19b26dcf877949b0ad2 (diff) | |
download | aspectj-f5d31bac784ae2c0cccb6a990d1fc54e86df2dd1.tar.gz aspectj-f5d31bac784ae2c0cccb6a990d1fc54e86df2dd1.zip |
fixed 39974: Some strange error when compiling the observer example with JBuilder7 integrated AJDE
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java index 9b363b88c..eecf41d0e 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java @@ -180,7 +180,6 @@ public class AsmBuilder extends AbstractSyntaxTreeVisitorAdapter { public boolean visit(TypeDeclaration typeDeclaration, CompilationUnitScope scope) { String name = new String(typeDeclaration.name); - //System.err.println("type with name: " + name); ProgramElementNode.Kind kind = ProgramElementNode.Kind.CLASS; if (typeDeclaration instanceof AspectDeclaration) kind = ProgramElementNode.Kind.ASPECT; else if (typeDeclaration.isInterface()) kind = ProgramElementNode.Kind.INTERFACE; @@ -281,6 +280,7 @@ public class AsmBuilder extends AbstractSyntaxTreeVisitorAdapter { } // !!! improve name and type generation + // TODO: improve handling of malformed methodDeclaration.binding public boolean visit(MethodDeclaration methodDeclaration, ClassScope scope) { ProgramElementNode.Kind kind = ProgramElementNode.Kind.METHOD; String label = new String(methodDeclaration.selector); @@ -328,9 +328,18 @@ public class AsmBuilder extends AbstractSyntaxTreeVisitorAdapter { } if (methodDeclaration.binding != null) { - Member member = EclipseFactory.makeResolvedMember(methodDeclaration.binding); - peNode.setBytecodeName(member.getName()); - peNode.setBytecodeSignature(member.getSignature()); + String memberName = ""; + String memberBytecodeSignature = ""; + try { + Member member = EclipseFactory.makeResolvedMember(methodDeclaration.binding); + memberName = member.getName(); + memberBytecodeSignature = member.getSignature(); + } catch (NullPointerException npe) { + memberName = "<undefined>"; + } + + peNode.setBytecodeName(memberName); + peNode.setBytecodeSignature(memberBytecodeSignature); } ((StructureNode)stack.peek()).addChild(peNode); stack.push(peNode); |