issue_id
int64
2.04k
425k
title
stringlengths
9
251
body
stringlengths
4
32.8k
status
stringclasses
6 values
after_fix_sha
stringlengths
7
7
project_name
stringclasses
6 values
repo_url
stringclasses
6 values
repo_name
stringclasses
6 values
language
stringclasses
1 value
issue_url
null
before_fix_sha
null
pull_url
null
commit_datetime
timestamp[us, tz=UTC]
report_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
23
187
chunk_content
stringlengths
1
22k
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
case TerminalTokens.TokenNameIdentifier:110 return this.scanner.getCurrentTokenEndPosition(); } } } catch(InvalidInputException e) { ignore } return -1; } /** * This method is used to retrieve position before the next comma or semi-colon. * @return int the position found. */ protected int retrievePositionBeforeNextCommaOrSemiColon(int start, int end) { this.scanner.resetTo(start, end); int braceCounter = 0; try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch(token) { case TerminalTokens.TokenNameLBRACE : braceCounter++; break; case TerminalTokens.TokenNameRBRACE : braceCounter--; break; case TerminalTokens.TokenNameLPAREN : braceCounter++; break; case TerminalTokens.TokenNameRPAREN :
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
braceCounter--; break; case TerminalTokens.TokenNameLBRACKET : braceCounter++; break; case TerminalTokens.TokenNameRBRACKET : braceCounter--; break; case TerminalTokens.TokenNameCOMMA : case TerminalTokens.TokenNameSEMICOLON : if (braceCounter == 0) { return this.scanner.startPosition - 1; } } } } catch(InvalidInputException e) { ignore } return -1; } protected int retrieveProperRightBracketPosition(int bracketNumber, int start) { this.scanner.resetTo(start, this.compilationUnitSourceLength); try { int token, count = 0; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch(token) { case TerminalTokens.TokenNameRBRACKET: count++; if (count == bracketNumber) { return this.scanner.currentPosition - 1;
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
} } } } catch(InvalidInputException e) { ignore } return -1; } /** * This method is used to retrieve position before the next right brace or semi-colon. * @return int the position found. */ protected int retrieveRightBraceOrSemiColonPosition(int start, int end) { this.scanner.resetTo(start, end); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch(token) { case TerminalTokens.TokenNameRBRACE : return this.scanner.currentPosition - 1; case TerminalTokens.TokenNameSEMICOLON : return this.scanner.currentPosition - 1; } } } catch(InvalidInputException e) { ignore } return -1; } /**
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
* This method is used to retrieve position before the next right brace or semi-colon. * @return int the position found. */ protected int retrieveRightBrace(int start, int end) { this.scanner.resetTo(start, end); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch(token) { case TerminalTokens.TokenNameRBRACE : return this.scanner.currentPosition - 1; } } } catch(InvalidInputException e) { ignore } return -1; } /** * This method is used to retrieve the position of the right bracket. * @return int the dimension found, -1 if none */ protected int retrieveRightBracketPosition(int start, int end) { this.scanner.resetTo(start, end); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch(token) { case TerminalTokens.TokenNameRBRACKET:
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
return this.scanner.currentPosition - 1; } } } catch(InvalidInputException e) { ignore } return -1; } /* * This method is used to set the right end position for expression * statement. The actual AST nodes don't include the trailing semicolon. * This method fixes the length of the corresponding node. */ protected void retrieveSemiColonPosition(ASTNode node) { int start = node.getStartPosition(); int length = node.getLength(); int end = start + length; int count = 0; this.scanner.resetTo(end, this.compilationUnitSourceLength); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch(token) { case TerminalTokens.TokenNameSEMICOLON: if (count == 0) { node.setSourceRange(start, this.scanner.currentPosition - start); return; } break;
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
case TerminalTokens.TokenNameLBRACE : count++; break; case TerminalTokens.TokenNameRBRACE : count--; break; case TerminalTokens.TokenNameLPAREN : count++; break; case TerminalTokens.TokenNameRPAREN : count--; break; case TerminalTokens.TokenNameLBRACKET : count++; break; case TerminalTokens.TokenNameRBRACKET : count--; } } } catch(InvalidInputException e) { ignore } } /** * This method is used to retrieve the start position of the block. * @return int the dimension found, -1 if none */ protected int retrieveStartBlockPosition(int start, int end) { this.scanner.resetTo(start, end);
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch(token) { case TerminalTokens.TokenNameLBRACE:110 return this.scanner.startPosition; } } } catch(InvalidInputException e) { ignore } return -1; } /** * This method is used to retrieve the starting position of the catch keyword. * @return int the dimension found, -1 if none */ protected int retrieveStartingCatchPosition(int start, int end) { this.scanner.resetTo(start, end); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch(token) { case TerminalTokens.TokenNamecatch:225 return this.scanner.startPosition; } } } catch(InvalidInputException e) { ignore }
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
return -1; } public void setAST(AST ast) { this.ast = ast; this.docParser = new DocCommentParser(this.ast, this.scanner, this.insideComments); } protected void setModifiers(AnnotationTypeDeclaration typeDecl, org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration) { this.scanner.resetTo(typeDeclaration.declarationSourceStart, typeDeclaration.sourceStart); this.setModifiers(typeDecl, typeDeclaration.annotations); } protected void setModifiers(AnnotationTypeMemberDeclaration annotationTypeMemberDecl, org.aspectj.org.eclipse.jdt.internal.compiler.ast.AnnotationMethodDeclaration annotationTypeMemberDeclaration) { this.scanner.resetTo(annotationTypeMemberDeclaration.declarationSourceStart, annotationTypeMemberDeclaration.sourceStart); this.setModifiers(annotationTypeMemberDecl, annotationTypeMemberDeclaration.annotations); } /** * @param bodyDeclaration */ protected void setModifiers(BodyDeclaration bodyDeclaration, org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations) { try { int token; int indexInAnnotations = 0; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { IExtendedModifier modifier = null; switch(token) { case TerminalTokens.TokenNameabstract: modifier = createModifier(Modifier.ModifierKeyword.ABSTRACT_KEYWORD); break; case TerminalTokens.TokenNamepublic:
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
modifier = createModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD); break; case TerminalTokens.TokenNamestatic: modifier = createModifier(Modifier.ModifierKeyword.STATIC_KEYWORD); break; case TerminalTokens.TokenNameprotected: modifier = createModifier(Modifier.ModifierKeyword.PROTECTED_KEYWORD); break; case TerminalTokens.TokenNameprivate: modifier = createModifier(Modifier.ModifierKeyword.PRIVATE_KEYWORD); break; case TerminalTokens.TokenNamefinal: modifier = createModifier(Modifier.ModifierKeyword.FINAL_KEYWORD); break; case TerminalTokens.TokenNamenative: modifier = createModifier(Modifier.ModifierKeyword.NATIVE_KEYWORD); break; case TerminalTokens.TokenNamesynchronized: modifier = createModifier(Modifier.ModifierKeyword.SYNCHRONIZED_KEYWORD); break; case TerminalTokens.TokenNametransient: modifier = createModifier(Modifier.ModifierKeyword.TRANSIENT_KEYWORD); break; case TerminalTokens.TokenNamevolatile: modifier = createModifier(Modifier.ModifierKeyword.VOLATILE_KEYWORD); break; case TerminalTokens.TokenNamestrictfp: modifier = createModifier(Modifier.ModifierKeyword.STRICTFP_KEYWORD); break; case TerminalTokens.TokenNameAT :
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
if (annotations != null && indexInAnnotations < annotations.length) { org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation annotation = annotations[indexInAnnotations++]; modifier = super.convert(annotation); this.scanner.resetTo(annotation.declarationSourceEnd + 1, this.compilationUnitSourceLength); } break; case TerminalTokens.TokenNameCOMMENT_BLOCK : case TerminalTokens.TokenNameCOMMENT_LINE : case TerminalTokens.TokenNameCOMMENT_JAVADOC : break; default : return; } if (modifier != null) { bodyDeclaration.modifiers().add(modifier); } } } catch(InvalidInputException e) { ignore } } protected void setModifiers(EnumDeclaration enumDeclaration, org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration enumDeclaration2) { this.scanner.resetTo(enumDeclaration2.declarationSourceStart, enumDeclaration2.sourceStart); this.setModifiers(enumDeclaration, enumDeclaration2.annotations); } protected void setModifiers(EnumConstantDeclaration enumConstantDeclaration, org.aspectj.org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDeclaration) {
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : enumConstantDeclaration.internalSetModifiers(fieldDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag); if (fieldDeclaration.annotations != null) { enumConstantDeclaration.setFlags(enumConstantDeclaration.getFlags() | ASTNode.MALFORMED); } break; case AST.JLS3 : this.scanner.resetTo(fieldDeclaration.declarationSourceStart, fieldDeclaration.sourceStart); this.setModifiers(enumConstantDeclaration, fieldDeclaration.annotations); } } /** * @param fieldDeclaration * @param fieldDecl */ protected void setModifiers(FieldDeclaration fieldDeclaration, org.aspectj.org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDecl) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : fieldDeclaration.internalSetModifiers(fieldDecl.modifiers & ExtraCompilerModifiers.AccJustFlag); if (fieldDecl.annotations != null) { fieldDeclaration.setFlags(fieldDeclaration.getFlags() | ASTNode.MALFORMED); } break; case AST.JLS3 : this.scanner.resetTo(fieldDecl.declarationSourceStart, fieldDecl.sourceStart); this.setModifiers(fieldDeclaration, fieldDecl.annotations); } }
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
protected void setModifiers(org.aspectj.org.eclipse.jdt.core.dom.InterTypeFieldDeclaration fieldDeclaration, InterTypeFieldDeclaration fieldDecl) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : fieldDeclaration.internalSetModifiers(fieldDecl.declaredModifiers & ExtraCompilerModifiers.AccJustFlag); if (fieldDecl.annotations != null) { fieldDeclaration.setFlags(fieldDeclaration.getFlags() | ASTNode.MALFORMED); } break; case AST.JLS3 : this.scanner.resetTo(fieldDecl.declarationSourceStart, fieldDecl.sourceStart); this.setModifiers(fieldDeclaration, fieldDecl.annotations); } } /** * @param initializer * @param oldInitializer */ protected void setModifiers(Initializer initializer, org.aspectj.org.eclipse.jdt.internal.compiler.ast.Initializer oldInitializer) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL: initializer.internalSetModifiers(oldInitializer.modifiers & ExtraCompilerModifiers.AccJustFlag); if (oldInitializer.annotations != null) { initializer.setFlags(initializer.getFlags() | ASTNode.MALFORMED); } break; case AST.JLS3 : this.scanner.resetTo(oldInitializer.declarationSourceStart, oldInitializer.bodyStart);
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
this.setModifiers(initializer, oldInitializer.annotations); } } /** * @param methodDecl * @param methodDeclaration */ protected void setModifiers(MethodDeclaration methodDecl, AbstractMethodDeclaration methodDeclaration) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : if (methodDeclaration instanceof InterTypeDeclaration) { methodDecl.internalSetModifiers(((InterTypeDeclaration)methodDeclaration).declaredModifiers & ExtraCompilerModifiers.AccJustFlag); } else { methodDecl.internalSetModifiers(methodDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag); } if (methodDeclaration.annotations != null) { methodDecl.setFlags(methodDecl.getFlags() | ASTNode.MALFORMED); } break; case AST.JLS3 : this.scanner.resetTo(methodDeclaration.declarationSourceStart, methodDeclaration.sourceStart); this.setModifiers(methodDecl, methodDeclaration.annotations); } } protected void setModifiers(org.aspectj.org.eclipse.jdt.core.dom.PointcutDeclaration pointcutDecl, PointcutDeclaration pointcutDeclaration) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : pointcutDecl.internalSetModifiers(pointcutDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag);
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
if (pointcutDeclaration.annotations != null) { pointcutDecl.setFlags(pointcutDecl.getFlags() | ASTNode.MALFORMED); } break; case AST.JLS3 : this.scanner.resetTo(pointcutDeclaration.declarationSourceStart, pointcutDeclaration.sourceStart); this.setModifiers(pointcutDecl, pointcutDeclaration.annotations); } } /** * @param variableDecl * @param argument */ protected void setModifiers(SingleVariableDeclaration variableDecl, Argument argument) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : variableDecl.internalSetModifiers(argument.modifiers & ExtraCompilerModifiers.AccJustFlag); if (argument.annotations != null) { variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED); } break; case AST.JLS3 : this.scanner.resetTo(argument.declarationSourceStart, argument.sourceStart); org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations = argument.annotations; int indexInAnnotations = 0; try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { IExtendedModifier modifier = null; switch(token) {
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
case TerminalTokens.TokenNameabstract: modifier = createModifier(Modifier.ModifierKeyword.ABSTRACT_KEYWORD); break; case TerminalTokens.TokenNamepublic: modifier = createModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD); break; case TerminalTokens.TokenNamestatic: modifier = createModifier(Modifier.ModifierKeyword.STATIC_KEYWORD); break; case TerminalTokens.TokenNameprotected: modifier = createModifier(Modifier.ModifierKeyword.PROTECTED_KEYWORD); break; case TerminalTokens.TokenNameprivate: modifier = createModifier(Modifier.ModifierKeyword.PRIVATE_KEYWORD); break; case TerminalTokens.TokenNamefinal: modifier = createModifier(Modifier.ModifierKeyword.FINAL_KEYWORD); break; case TerminalTokens.TokenNamenative: modifier = createModifier(Modifier.ModifierKeyword.NATIVE_KEYWORD); break; case TerminalTokens.TokenNamesynchronized: modifier = createModifier(Modifier.ModifierKeyword.SYNCHRONIZED_KEYWORD); break; case TerminalTokens.TokenNametransient: modifier = createModifier(Modifier.ModifierKeyword.TRANSIENT_KEYWORD); break; case TerminalTokens.TokenNamevolatile: modifier = createModifier(Modifier.ModifierKeyword.VOLATILE_KEYWORD); break;
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
case TerminalTokens.TokenNamestrictfp: modifier = createModifier(Modifier.ModifierKeyword.STRICTFP_KEYWORD); break; case TerminalTokens.TokenNameAT : if (annotations != null && indexInAnnotations < annotations.length) { org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation annotation = annotations[indexInAnnotations++]; modifier = super.convert(annotation); this.scanner.resetTo(annotation.declarationSourceEnd + 1, this.compilationUnitSourceLength); } break; case TerminalTokens.TokenNameCOMMENT_BLOCK : case TerminalTokens.TokenNameCOMMENT_LINE : case TerminalTokens.TokenNameCOMMENT_JAVADOC : break; default : return; } if (modifier != null) { variableDecl.modifiers().add(modifier); } } } catch(InvalidInputException e) { ignore } } } protected void setModifiers(SingleVariableDeclaration variableDecl, LocalDeclaration localDeclaration) { switch(this.ast.apiLevel) {
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
case AST.JLS2_INTERNAL : variableDecl.internalSetModifiers(localDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag); if (localDeclaration.annotations != null) { variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED); } break; case AST.JLS3 : this.scanner.resetTo(localDeclaration.declarationSourceStart, localDeclaration.sourceStart); org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations = localDeclaration.annotations; int indexInAnnotations = 0; try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { IExtendedModifier modifier = null; switch(token) { case TerminalTokens.TokenNameabstract: modifier = createModifier(Modifier.ModifierKeyword.ABSTRACT_KEYWORD); break; case TerminalTokens.TokenNamepublic: modifier = createModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD); break; case TerminalTokens.TokenNamestatic: modifier = createModifier(Modifier.ModifierKeyword.STATIC_KEYWORD); break; case TerminalTokens.TokenNameprotected: modifier = createModifier(Modifier.ModifierKeyword.PROTECTED_KEYWORD); break; case TerminalTokens.TokenNameprivate: modifier = createModifier(Modifier.ModifierKeyword.PRIVATE_KEYWORD); break;
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
case TerminalTokens.TokenNamefinal: modifier = createModifier(Modifier.ModifierKeyword.FINAL_KEYWORD); break; case TerminalTokens.TokenNamenative: modifier = createModifier(Modifier.ModifierKeyword.NATIVE_KEYWORD); break; case TerminalTokens.TokenNamesynchronized: modifier = createModifier(Modifier.ModifierKeyword.SYNCHRONIZED_KEYWORD); break; case TerminalTokens.TokenNametransient: modifier = createModifier(Modifier.ModifierKeyword.TRANSIENT_KEYWORD); break; case TerminalTokens.TokenNamevolatile: modifier = createModifier(Modifier.ModifierKeyword.VOLATILE_KEYWORD); break; case TerminalTokens.TokenNamestrictfp: modifier = createModifier(Modifier.ModifierKeyword.STRICTFP_KEYWORD); break; case TerminalTokens.TokenNameAT : if (annotations != null && indexInAnnotations < annotations.length) { org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation annotation = annotations[indexInAnnotations++]; modifier = super.convert(annotation); this.scanner.resetTo(annotation.declarationSourceEnd + 1, this.compilationUnitSourceLength); } break; case TerminalTokens.TokenNameCOMMENT_BLOCK : case TerminalTokens.TokenNameCOMMENT_LINE : case TerminalTokens.TokenNameCOMMENT_JAVADOC : break;
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
default : return; } if (modifier != null) { variableDecl.modifiers().add(modifier); } } } catch(InvalidInputException e) { ignore } } } /** * @param typeDecl * @param typeDeclaration */ protected void setModifiers(TypeDeclaration typeDecl, org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : int modifiers = typeDeclaration.modifiers; modifiers &= ~ClassFileConstants.AccInterface; modifiers &= ExtraCompilerModifiers.AccJustFlag; typeDecl.internalSetModifiers(modifiers); if (typeDeclaration.annotations != null) { typeDecl.setFlags(typeDecl.getFlags() | ASTNode.MALFORMED); } break; case AST.JLS3 : this.scanner.resetTo(typeDeclaration.declarationSourceStart, typeDeclaration.sourceStart); this.setModifiers(typeDecl, typeDeclaration.annotations);
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
} } /** * @param variableDeclarationExpression * @param localDeclaration */ protected void setModifiers(VariableDeclarationExpression variableDeclarationExpression, LocalDeclaration localDeclaration) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : int modifiers = localDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag; modifiers &= ~ExtraCompilerModifiers.AccBlankFinal; variableDeclarationExpression.internalSetModifiers(modifiers); if (localDeclaration.annotations != null) { variableDeclarationExpression.setFlags(variableDeclarationExpression.getFlags() | ASTNode.MALFORMED); } break; case AST.JLS3 : this.scanner.resetTo(localDeclaration.declarationSourceStart, localDeclaration.sourceStart); org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations = localDeclaration.annotations; int indexInAnnotations = 0; try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { IExtendedModifier modifier = null; switch(token) { case TerminalTokens.TokenNameabstract: modifier = createModifier(Modifier.ModifierKeyword.ABSTRACT_KEYWORD); break; case TerminalTokens.TokenNamepublic:
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
modifier = createModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD); break; case TerminalTokens.TokenNamestatic: modifier = createModifier(Modifier.ModifierKeyword.STATIC_KEYWORD); break; case TerminalTokens.TokenNameprotected: modifier = createModifier(Modifier.ModifierKeyword.PROTECTED_KEYWORD); break; case TerminalTokens.TokenNameprivate: modifier = createModifier(Modifier.ModifierKeyword.PRIVATE_KEYWORD); break; case TerminalTokens.TokenNamefinal: modifier = createModifier(Modifier.ModifierKeyword.FINAL_KEYWORD); break; case TerminalTokens.TokenNamenative: modifier = createModifier(Modifier.ModifierKeyword.NATIVE_KEYWORD); break; case TerminalTokens.TokenNamesynchronized: modifier = createModifier(Modifier.ModifierKeyword.SYNCHRONIZED_KEYWORD); break; case TerminalTokens.TokenNametransient: modifier = createModifier(Modifier.ModifierKeyword.TRANSIENT_KEYWORD); break; case TerminalTokens.TokenNamevolatile: modifier = createModifier(Modifier.ModifierKeyword.VOLATILE_KEYWORD); break; case TerminalTokens.TokenNamestrictfp: modifier = createModifier(Modifier.ModifierKeyword.STRICTFP_KEYWORD); break; case TerminalTokens.TokenNameAT :
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
if (annotations != null && indexInAnnotations < annotations.length) { org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation annotation = annotations[indexInAnnotations++]; modifier = super.convert(annotation); this.scanner.resetTo(annotation.declarationSourceEnd + 1, this.compilationUnitSourceLength); } break; case TerminalTokens.TokenNameCOMMENT_BLOCK : case TerminalTokens.TokenNameCOMMENT_LINE : case TerminalTokens.TokenNameCOMMENT_JAVADOC : break; default : return; } if (modifier != null) { variableDeclarationExpression.modifiers().add(modifier); } } } catch(InvalidInputException e) { ignore } } } /** * @param variableDeclarationStatement * @param localDeclaration */ protected void setModifiers(VariableDeclarationStatement variableDeclarationStatement, LocalDeclaration localDeclaration) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL :
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
int modifiers = localDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag; modifiers &= ~ExtraCompilerModifiers.AccBlankFinal; variableDeclarationStatement.internalSetModifiers(modifiers); if (localDeclaration.annotations != null) { variableDeclarationStatement.setFlags(variableDeclarationStatement.getFlags() | ASTNode.MALFORMED); } break; case AST.JLS3 : this.scanner.resetTo(localDeclaration.declarationSourceStart, localDeclaration.sourceStart); org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations = localDeclaration.annotations; int indexInAnnotations = 0; try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { IExtendedModifier modifier = null; switch(token) { case TerminalTokens.TokenNameabstract: modifier = createModifier(Modifier.ModifierKeyword.ABSTRACT_KEYWORD); break; case TerminalTokens.TokenNamepublic: modifier = createModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD); break; case TerminalTokens.TokenNamestatic: modifier = createModifier(Modifier.ModifierKeyword.STATIC_KEYWORD); break; case TerminalTokens.TokenNameprotected: modifier = createModifier(Modifier.ModifierKeyword.PROTECTED_KEYWORD); break; case TerminalTokens.TokenNameprivate: modifier = createModifier(Modifier.ModifierKeyword.PRIVATE_KEYWORD);
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
break; case TerminalTokens.TokenNamefinal: modifier = createModifier(Modifier.ModifierKeyword.FINAL_KEYWORD); break; case TerminalTokens.TokenNamenative: modifier = createModifier(Modifier.ModifierKeyword.NATIVE_KEYWORD); break; case TerminalTokens.TokenNamesynchronized: modifier = createModifier(Modifier.ModifierKeyword.SYNCHRONIZED_KEYWORD); break; case TerminalTokens.TokenNametransient: modifier = createModifier(Modifier.ModifierKeyword.TRANSIENT_KEYWORD); break; case TerminalTokens.TokenNamevolatile: modifier = createModifier(Modifier.ModifierKeyword.VOLATILE_KEYWORD); break; case TerminalTokens.TokenNamestrictfp: modifier = createModifier(Modifier.ModifierKeyword.STRICTFP_KEYWORD); break; case TerminalTokens.TokenNameAT : if (annotations != null && indexInAnnotations < annotations.length) { org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation annotation = annotations[indexInAnnotations++]; modifier = super.convert(annotation); this.scanner.resetTo(annotation.declarationSourceEnd + 1, this.compilationUnitSourceLength); } break; case TerminalTokens.TokenNameCOMMENT_BLOCK : case TerminalTokens.TokenNameCOMMENT_LINE : case TerminalTokens.TokenNameCOMMENT_JAVADOC :
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
break; default : return; } if (modifier != null) { variableDeclarationStatement.modifiers().add(modifier); } } } catch(InvalidInputException e) { ignore } } } protected QualifiedName setQualifiedNameNameAndSourceRanges(char[][] typeName, long[] positions, org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode node) { int length = typeName.length; final SimpleName firstToken = new SimpleName(this.ast); firstToken.internalSetIdentifier(new String(typeName[0])); firstToken.index = 1; int start0 = (int)(positions[0]>>>32); int start = start0; int end = (int)(positions[0] & 0xFFFFFFFF); firstToken.setSourceRange(start, end - start + 1); final SimpleName secondToken = new SimpleName(this.ast); secondToken.internalSetIdentifier(new String(typeName[1])); secondToken.index = 2; start = (int)(positions[1]>>>32); end = (int)(positions[1] & 0xFFFFFFFF); secondToken.setSourceRange(start, end - start + 1); QualifiedName qualifiedName = new QualifiedName(this.ast); qualifiedName.setQualifier(firstToken);
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
qualifiedName.setName(secondToken); if (this.resolveBindings) { recordNodes(qualifiedName, node); recordPendingNameScopeResolution(qualifiedName); recordNodes(firstToken, node); recordNodes(secondToken, node); recordPendingNameScopeResolution(firstToken); recordPendingNameScopeResolution(secondToken); } qualifiedName.index = 2; qualifiedName.setSourceRange(start0, end - start0 + 1); SimpleName newPart = null; for (int i = 2; i < length; i++) { newPart = new SimpleName(this.ast); newPart.internalSetIdentifier(new String(typeName[i])); newPart.index = i + 1; start = (int)(positions[i]>>>32); end = (int)(positions[i] & 0xFFFFFFFF); newPart.setSourceRange(start, end - start + 1); QualifiedName qualifiedName2 = new QualifiedName(this.ast); qualifiedName2.setQualifier(qualifiedName); qualifiedName2.setName(newPart); qualifiedName = qualifiedName2; qualifiedName.index = newPart.index; qualifiedName.setSourceRange(start0, end - start0 + 1); if (this.resolveBindings) { recordNodes(qualifiedName, node); recordNodes(newPart, node); recordPendingNameScopeResolution(qualifiedName); recordPendingNameScopeResolution(newPart);
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
} } QualifiedName name = qualifiedName; if (this.resolveBindings) { recordNodes(name, node); recordPendingNameScopeResolution(name); } return name; } protected QualifiedName setQualifiedNameNameAndSourceRanges(char[][] typeName, long[] positions, int endingIndex, org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode node) { int length = endingIndex + 1; final SimpleName firstToken = new SimpleName(this.ast); firstToken.internalSetIdentifier(new String(typeName[0])); firstToken.index = 1; int start0 = (int)(positions[0]>>>32); int start = start0; int end = (int) positions[0]; firstToken.setSourceRange(start, end - start + 1); final SimpleName secondToken = new SimpleName(this.ast); secondToken.internalSetIdentifier(new String(typeName[1])); secondToken.index = 2; start = (int)(positions[1]>>>32); end = (int) positions[1]; secondToken.setSourceRange(start, end - start + 1); QualifiedName qualifiedName = new QualifiedName(this.ast); qualifiedName.setQualifier(firstToken); qualifiedName.setName(secondToken); if (this.resolveBindings) { recordNodes(qualifiedName, node);
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
recordPendingNameScopeResolution(qualifiedName); recordNodes(firstToken, node); recordNodes(secondToken, node); recordPendingNameScopeResolution(firstToken); recordPendingNameScopeResolution(secondToken); } qualifiedName.index = 2; qualifiedName.setSourceRange(start0, end - start0 + 1); SimpleName newPart = null; for (int i = 2; i < length; i++) { newPart = new SimpleName(this.ast); newPart.internalSetIdentifier(new String(typeName[i])); newPart.index = i + 1; start = (int)(positions[i]>>>32); end = (int) positions[i]; newPart.setSourceRange(start, end - start + 1); QualifiedName qualifiedName2 = new QualifiedName(this.ast); qualifiedName2.setQualifier(qualifiedName); qualifiedName2.setName(newPart); qualifiedName = qualifiedName2; qualifiedName.index = newPart.index; qualifiedName.setSourceRange(start0, end - start0 + 1); if (this.resolveBindings) { recordNodes(qualifiedName, node); recordNodes(newPart, node); recordPendingNameScopeResolution(qualifiedName); recordPendingNameScopeResolution(newPart); } } if (newPart == null && this.resolveBindings) {
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
recordNodes(qualifiedName, node); recordPendingNameScopeResolution(qualifiedName); } return qualifiedName; } protected void setTypeNameForAnnotation(org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation compilerAnnotation, Annotation annotation) { TypeReference typeReference = compilerAnnotation.type; if (typeReference instanceof QualifiedTypeReference) { QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) typeReference; char[][] tokens = qualifiedTypeReference.tokens; long[] positions = qualifiedTypeReference.sourcePositions; annotation.setTypeName(setQualifiedNameNameAndSourceRanges(tokens, positions, typeReference)); } else { SingleTypeReference singleTypeReference = (SingleTypeReference) typeReference; final SimpleName name = new SimpleName(this.ast); name.internalSetIdentifier(new String(singleTypeReference.token)); int start = singleTypeReference.sourceStart; int end = singleTypeReference.sourceEnd; name.setSourceRange(start, end - start + 1); annotation.setTypeName(name); if (this.resolveBindings) { recordNodes(name, typeReference); } } } protected void setTypeForField(FieldDeclaration fieldDeclaration, Type type, int extraDimension) { if (extraDimension != 0) {
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
if (type.isArrayType()) { ArrayType arrayType = (ArrayType) type; int remainingDimensions = arrayType.getDimensions() - extraDimension; if (remainingDimensions == 0) { Type elementType = arrayType.getElementType(); elementType.setParent(null, null); this.ast.getBindingResolver().updateKey(type, elementType); fieldDeclaration.setType(elementType); } else { int start = type.getStartPosition(); ArrayType subarrayType = arrayType; int index = extraDimension; while (index > 0) { subarrayType = (ArrayType) subarrayType.getComponentType(); index--; } int end = retrieveProperRightBracketPosition(remainingDimensions, start); subarrayType.setSourceRange(start, end - start + 1); subarrayType.setParent(null, null); fieldDeclaration.setType(subarrayType); updateInnerPositions(subarrayType, remainingDimensions); this.ast.getBindingResolver().updateKey(type, subarrayType); } } else { fieldDeclaration.setType(type); } } else {
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
if (type.isArrayType()) { int dimensions = ((ArrayType) type).getDimensions(); updateInnerPositions(type, dimensions); } fieldDeclaration.setType(type); } } protected void setTypeForAroundAdviceDeclaration(AroundAdviceDeclaration adviceDeclaration, Type type) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : adviceDeclaration.internalSetReturnType(type); break; case AST.JLS3 : adviceDeclaration.setReturnType2(type); break; } } protected void setTypeForMethodDeclaration(MethodDeclaration methodDeclaration, Type type, int extraDimension) { if (extraDimension != 0) { if (type.isArrayType()) { ArrayType arrayType = (ArrayType) type; int remainingDimensions = arrayType.getDimensions() - extraDimension; if (remainingDimensions == 0) { Type elementType = arrayType.getElementType();
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
elementType.setParent(null, null); this.ast.getBindingResolver().updateKey(type, elementType); switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : methodDeclaration.internalSetReturnType(elementType); break; case AST.JLS3 : methodDeclaration.setReturnType2(elementType); break; } } else { int start = type.getStartPosition(); ArrayType subarrayType = arrayType; int index = extraDimension; while (index > 0) { subarrayType = (ArrayType) subarrayType.getComponentType(); index--; } int end = retrieveProperRightBracketPosition(remainingDimensions, start); subarrayType.setSourceRange(start, end - start + 1); subarrayType.setParent(null, null); updateInnerPositions(subarrayType, remainingDimensions); switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : methodDeclaration.internalSetReturnType(subarrayType); break; case AST.JLS3 : methodDeclaration.setReturnType2(subarrayType); break;
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
} this.ast.getBindingResolver().updateKey(type, subarrayType); } } else { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : methodDeclaration.internalSetReturnType(type); break; case AST.JLS3 : methodDeclaration.setReturnType2(type); break; } } } else { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : methodDeclaration.internalSetReturnType(type); break; case AST.JLS3 : methodDeclaration.setReturnType2(type); break; } } } protected void setTypeForMethodDeclaration(AnnotationTypeMemberDeclaration annotationTypeMemberDeclaration, Type type, int extraDimension) { annotationTypeMemberDeclaration.setType(type); } protected void setTypeForSingleVariableDeclaration(SingleVariableDeclaration singleVariableDeclaration, Type type, int extraDimension) { if (extraDimension != 0) {
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
if (type.isArrayType()) { ArrayType arrayType = (ArrayType) type; int remainingDimensions = arrayType.getDimensions() - extraDimension; if (remainingDimensions == 0) { Type elementType = arrayType.getElementType(); elementType.setParent(null, null); this.ast.getBindingResolver().updateKey(type, elementType); singleVariableDeclaration.setType(elementType); } else { int start = type.getStartPosition(); ArrayType subarrayType = arrayType; int index = extraDimension; while (index > 0) { subarrayType = (ArrayType) subarrayType.getComponentType(); index--; } int end = retrieveProperRightBracketPosition(remainingDimensions, start); subarrayType.setSourceRange(start, end - start + 1); subarrayType.setParent(null, null); updateInnerPositions(subarrayType, remainingDimensions); singleVariableDeclaration.setType(subarrayType); this.ast.getBindingResolver().updateKey(type, subarrayType); } } else { singleVariableDeclaration.setType(type); } } else {
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
singleVariableDeclaration.setType(type); } } protected void setTypeForVariableDeclarationExpression(VariableDeclarationExpression variableDeclarationExpression, Type type, int extraDimension) { if (extraDimension != 0) { if (type.isArrayType()) { ArrayType arrayType = (ArrayType) type; int remainingDimensions = arrayType.getDimensions() - extraDimension; if (remainingDimensions == 0) { Type elementType = arrayType.getElementType(); elementType.setParent(null, null); this.ast.getBindingResolver().updateKey(type, elementType); variableDeclarationExpression.setType(elementType); } else { int start = type.getStartPosition(); ArrayType subarrayType = arrayType; int index = extraDimension; while (index > 0) { subarrayType = (ArrayType) subarrayType.getComponentType(); index--; } int end = retrieveProperRightBracketPosition(remainingDimensions, start); subarrayType.setSourceRange(start, end - start + 1); subarrayType.setParent(null, null); updateInnerPositions(subarrayType, remainingDimensions); variableDeclarationExpression.setType(subarrayType); this.ast.getBindingResolver().updateKey(type, subarrayType);
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
} } else { variableDeclarationExpression.setType(type); } } else { variableDeclarationExpression.setType(type); } } protected void setTypeForVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement, Type type, int extraDimension) { if (extraDimension != 0) { if (type.isArrayType()) { ArrayType arrayType = (ArrayType) type; int remainingDimensions = arrayType.getDimensions() - extraDimension; if (remainingDimensions == 0) { Type elementType = arrayType.getElementType(); elementType.setParent(null, null); this.ast.getBindingResolver().updateKey(type, elementType); variableDeclarationStatement.setType(elementType); } else { int start = type.getStartPosition(); ArrayType subarrayType = arrayType; int index = extraDimension; while (index > 0) { subarrayType = (ArrayType) subarrayType.getComponentType(); index--; } int end = retrieveProperRightBracketPosition(remainingDimensions, start); subarrayType.setSourceRange(start, end - start + 1);
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
subarrayType.setParent(null, null); updateInnerPositions(subarrayType, remainingDimensions); variableDeclarationStatement.setType(subarrayType); this.ast.getBindingResolver().updateKey(type, subarrayType); } } else { variableDeclarationStatement.setType(type); } } else { variableDeclarationStatement.setType(type); } } protected void updateInnerPositions(Type type, int dimensions) { if (dimensions > 1) { int start = type.getStartPosition(); Type currentComponentType = ((ArrayType) type).getComponentType(); int searchedDimension = dimensions - 1; int rightBracketEndPosition = start; while (currentComponentType.isArrayType()) { rightBracketEndPosition = retrieveProperRightBracketPosition(searchedDimension, start); currentComponentType.setSourceRange(start, rightBracketEndPosition - start + 1); currentComponentType = ((ArrayType) currentComponentType).getComponentType(); searchedDimension--; } } } }
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java
/******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.aspectj.org.eclipse.jdt.core.dom; /** * InterTypeFieldDeclaration DOM AST node. * has: * everything FieldDeclarations have * * Refused Bequest: * has the variableDeclarationFragments list * it redundantly inherits from FieldDeclaration * as fields can be declared like "int b; int a = b = 5;" * but ITD fields can't. * Note: * should also have the name of the type it was declared on! * @author ajh02 */ public class InterTypeFieldDeclaration extends FieldDeclaration {
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java
InterTypeFieldDeclaration(AST ast) { super(ast); } ASTNode clone0(AST target) { InterTypeFieldDeclaration result = new InterTypeFieldDeclaration(target); result.setSourceRange(this.getStartPosition(), this.getLength());
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java
result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.internalSetModifiers(getModifiers()); } if (this.ast.apiLevel >= AST.JLS3) { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); } result.setType((Type) getType().clone(target)); result.fragments().addAll( ASTNode.copySubtrees(target, fragments())); return result; } void accept0(ASTVisitor visitor) { if (visitor instanceof AjASTVisitor) { boolean visitChildren = ((AjASTVisitor)visitor).visit(this); if (visitChildren) { acceptChild(visitor, getJavadoc()); if (this.ast.apiLevel >= AST.JLS3) { acceptChildren(visitor, this.modifiers); } acceptChild(visitor, getType()); acceptChildren(visitor, this.variableDeclarationFragments); } ((AjASTVisitor)visitor).endVisit(this); } } }
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java
/******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.aspectj.org.eclipse.jdt.core.dom; import org.aspectj.org.eclipse.jdt.core.dom.AST; import org.aspectj.org.eclipse.jdt.core.dom.ASTNode; import org.aspectj.org.eclipse.jdt.core.dom.ASTVisitor; import org.aspectj.org.eclipse.jdt.core.dom.Block; import org.aspectj.org.eclipse.jdt.core.dom.Javadoc; import org.aspectj.org.eclipse.jdt.core.dom.Type; /** * InterTypeMethodDeclaration DOM AST node. * has: * everything MethodDeclarations have * * Note: * should also have the name of the type it's declared on! * @author ajh02 */ public class InterTypeMethodDeclaration extends MethodDeclaration {
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java
InterTypeMethodDeclaration(AST ast) { super(ast); } /* (omit javadoc for this method)
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java
* Method declared on ASTNode. */ ASTNode clone0(AST target) { InterTypeMethodDeclaration result = new InterTypeMethodDeclaration(target); result.setSourceRange(this.getStartPosition(), this.getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.internalSetModifiers(getModifiers()); result.setReturnType( (Type) ASTNode.copySubtree(target, getReturnType())); } if (this.ast.apiLevel >= AST.JLS3) { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.typeParameters().addAll( ASTNode.copySubtrees(target, typeParameters())); result.setReturnType2( (Type) ASTNode.copySubtree(target, getReturnType2())); } result.setConstructor(isConstructor()); result.setExtraDimensions(getExtraDimensions()); result.setName((SimpleName) getName().clone(target)); result.parameters().addAll( ASTNode.copySubtrees(target, parameters())); result.thrownExceptions().addAll( ASTNode.copySubtrees(target, thrownExceptions())); result.setBody( (Block) ASTNode.copySubtree(target, getBody())); return result; }
203,384
Bug 203384 AST: Type information not exposed on itmd, itfd...
The Types: org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
resolved fixed
114db35
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-01-22T18:48:29Z
2007-09-14T00:33:20Z
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java
/* (omit javadoc for this method) * Method declared on ASTNode. */ void accept0(ASTVisitor visitor) { if (visitor instanceof AjASTVisitor) { AjASTVisitor ajvis = (AjASTVisitor)visitor; boolean visitChildren = ajvis.visit(this); if (visitChildren) { acceptChild(ajvis, getJavadoc()); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { acceptChild(ajvis, getReturnType()); } else { acceptChildren(ajvis, this.modifiers); acceptChildren(ajvis, (NodeList)this.typeParameters()); acceptChild(ajvis, getReturnType2()); } acceptChild(ajvis, getName()); acceptChildren(ajvis, this.parameters); acceptChildren(ajvis, (NodeList)this.thrownExceptions()); acceptChild(ajvis, getBody()); } ajvis.endVisit(this); } } }
210,848
Bug 210848 Fix javadoc for ProceedingJoinPoint.proceed(Object[])
null
resolved fixed
b4715bc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-21T01:05:35Z
2007-11-24T21:33:20Z
runtime/src/org/aspectj/lang/ProceedingJoinPoint.java
/******************************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * initial implementation Alexandre Vasseur *******************************************************************************/ package org.aspectj.lang; import org.aspectj.runtime.internal.AroundClosure; /** * ProceedingJoinPoint exposes the proceed(..) method in order to support around advice in @AJ aspects * * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a> */ public interface ProceedingJoinPoint extends JoinPoint {
210,848
Bug 210848 Fix javadoc for ProceedingJoinPoint.proceed(Object[])
null
resolved fixed
b4715bc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-21T01:05:35Z
2007-11-24T21:33:20Z
runtime/src/org/aspectj/lang/ProceedingJoinPoint.java
/** * The joinpoint needs to know about its closure so that proceed can delegate to closure.run() * <p/> * This internal method should not be called directly, and won't be visible to the end-user when * packed in a jar (synthetic method) * * @param arc */ void set$AroundClosure(AroundClosure arc); /** * Proceed with the next advice or target method invocation * * @return * @throws Throwable */ public Object proceed() throws Throwable; /** * Proceed with the next advice or target method invocation * <p/> * The given args Object[] must be in the same order and size as the advice signature but * without the actual joinpoint instance * * @param args * @return * @throws Throwable */ public Object proceed(Object[] args) throws Throwable; }
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
/* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://www.eclipse.org/legal/epl-v10.html *
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
* Contributors: * PARC initial implementation * ******************************************************************/ package org.aspectj.weaver; import java.io.DataInputStream; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.aspectj.asm.IRelationship; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.ISourceLocation; import org.aspectj.bridge.Message; import org.aspectj.bridge.MessageUtil; import org.aspectj.bridge.WeaveMessage; import org.aspectj.lang.JoinPoint; import org.aspectj.util.PartialOrder; import org.aspectj.util.TypeSafeEnum; import org.aspectj.weaver.ast.Var; import org.aspectj.weaver.bcel.BcelAdvice; /* * The superclass of anything representing a the shadow of a join point. A shadow represents * some bit of code, and encompasses both entry and exit from that code. All shadows have a kind * and a signature. */ public abstract class Shadow {
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
private static int nextShadowID = 100; private final Kind kind; private final Member signature; private Member matchingSignature; private ResolvedMember resolvedSignature; protected final Shadow enclosingShadow; protected List mungers = Collections.EMPTY_LIST; public int shadowId = nextShadowID++; protected Shadow(Kind kind, Member signature, Shadow enclosingShadow) { this.kind = kind; this.signature = signature; this.enclosingShadow = enclosingShadow; } public abstract World getIWorld(); public List getMungers() { return mungers; } /** * could this(*) pcd ever match */ public final boolean hasThis() { if (getKind().neverHasThis()) { return false; } else if (getKind().isEnclosingKind()) {
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
return !getSignature().isStatic(); } else if (enclosingShadow == null) { return false; } else { return enclosingShadow.hasThis(); } } /** * the type of the this object here * * @throws IllegalStateException if there is no this here */ public final UnresolvedType getThisType() { if (!hasThis()) throw new IllegalStateException("no this"); if (getKind().isEnclosingKind()) { return getSignature().getDeclaringType(); } else { return enclosingShadow.getThisType(); } } /** * a var referencing this * * @throws IllegalStateException if there is no target here */ public abstract Var getThisVar();
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
/** * could target(*) pcd ever match */ public final boolean hasTarget() { if (getKind().neverHasTarget()) { return false; } else if (getKind().isTargetSameAsThis()) { return hasThis(); } else { return !getSignature().isStatic(); } } /** * the type of the target object here * * @throws IllegalStateException if there is no target here */ public final UnresolvedType getTargetType() { if (!hasTarget()) throw new IllegalStateException("no target"); return getSignature().getDeclaringType(); } /** * a var referencing the target * * @throws IllegalStateException if there is no target here */ public abstract Var getTargetVar(); public UnresolvedType[] getArgTypes() {
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
if (getKind() == FieldSet) return new UnresolvedType[] { getSignature().getReturnType() }; return getSignature().getParameterTypes(); } public boolean isShadowForArrayConstructionJoinpoint() { return (getKind()==ConstructorCall && signature.getDeclaringType().isArray()); } public boolean isShadowForMonitor() { return (getKind()==SynchronizationLock || getKind()==SynchronizationUnlock); } public ResolvedType[] getArgumentTypesForArrayConstructionShadow() { String s = signature.getDeclaringType().getSignature(); int pos = s.indexOf("["); int dims = 1; while (pos<s.length()) { pos++; if (pos<s.length()) dims+=(s.charAt(pos)=='['?1:0); } if (dims==1) return new ResolvedType[]{ResolvedType.INT}; ResolvedType[] someInts = new ResolvedType[dims]; for (int i = 0; i < dims;i++) someInts[i] = ResolvedType.INT; return someInts; } public UnresolvedType[] getGenericArgTypes() { if (isShadowForArrayConstructionJoinpoint()) { return getArgumentTypesForArrayConstructionShadow();
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
} if (isShadowForMonitor()) { return UnresolvedType.ARRAY_WITH_JUST_OBJECT; } if (getKind() == FieldSet) return new UnresolvedType[] { getResolvedSignature().getGenericReturnType() }; return getResolvedSignature().getGenericParameterTypes(); } public UnresolvedType getArgType(int arg) { if (getKind() == FieldSet) return getSignature().getReturnType(); return getSignature().getParameterTypes()[arg]; } public int getArgCount() { if (getKind() == FieldSet) return 1; return getSignature() .getParameterTypes().length; } /** * Return name of the argument at position 'i' at this shadow. This does not * make sense for all shadows - but can be useful in the case of, for example, * method-execution. * @return null if it cannot be determined */ public String getArgName(int i,World w) { String [] names = getSignature().getParameterNames(w); if (names==null || i>=names.length) return null; return names[i]; }
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
public abstract UnresolvedType getEnclosingType(); public abstract Var getArgVar(int i); public abstract Var getThisJoinPointVar(); public abstract Var getThisJoinPointStaticPartVar(); public abstract Var getThisEnclosingJoinPointStaticPartVar(); public abstract Var getKindedAnnotationVar(UnresolvedType forAnnotationType); public abstract Var getWithinAnnotationVar(UnresolvedType forAnnotationType); public abstract Var getWithinCodeAnnotationVar(UnresolvedType forAnnotationType); public abstract Var getThisAnnotationVar(UnresolvedType forAnnotationType); public abstract Var getTargetAnnotationVar(UnresolvedType forAnnotationType); public abstract Var getArgAnnotationVar(int i, UnresolvedType forAnnotationType); public abstract Member getEnclosingCodeSignature(); /** returns the kind of shadow this is, representing what happens under this shadow */ public Kind getKind() { return kind; } /** returns the signature of the thing under this shadow */ public Member getSignature() { return signature; } /** * returns the signature of the thing under this shadow, with
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
* any synthetic arguments removed */ public Member getMatchingSignature() { return matchingSignature != null ? matchingSignature : signature; } public void setMatchingSignature(Member member) { this.matchingSignature = member; } /** * returns the resolved signature of the thing under this shadow * */ public ResolvedMember getResolvedSignature() { if (resolvedSignature == null) { resolvedSignature = signature.resolve(getIWorld()); } return resolvedSignature; } public UnresolvedType getReturnType() { if (kind == ConstructorCall) return getSignature().getDeclaringType(); else if (kind == FieldSet) return ResolvedType.VOID; else if (kind == SynchronizationLock || kind==SynchronizationUnlock) return ResolvedType.VOID; return getResolvedSignature().getGenericReturnType(); } /**
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
* These names are the ones that will be returned by thisJoinPoint.getKind() * Those need to be documented somewhere */ public static final Kind MethodCall = new Kind(JoinPoint.METHOD_CALL, 1, true); public static final Kind ConstructorCall = new Kind(JoinPoint.CONSTRUCTOR_CALL, 2, true); public static final Kind MethodExecution = new Kind(JoinPoint.METHOD_EXECUTION, 3, false); public static final Kind ConstructorExecution = new Kind(JoinPoint.CONSTRUCTOR_EXECUTION, 4, false); public static final Kind FieldGet = new Kind(JoinPoint.FIELD_GET, 5, true); public static final Kind FieldSet = new Kind(JoinPoint.FIELD_SET, 6, true); public static final Kind StaticInitialization = new Kind(JoinPoint.STATICINITIALIZATION, 7, false); public static final Kind PreInitialization = new Kind(JoinPoint.PREINITIALIZATION, 8, false); public static final Kind AdviceExecution = new Kind(JoinPoint.ADVICE_EXECUTION, 9, false); public static final Kind Initialization = new Kind(JoinPoint.INITIALIZATION, 10, false); public static final Kind ExceptionHandler = new Kind(JoinPoint.EXCEPTION_HANDLER, 11, true); public static final Kind SynchronizationLock = new Kind(JoinPoint.SYNCHRONIZATION_LOCK, 12, true); public static final Kind SynchronizationUnlock= new Kind(JoinPoint.SYNCHRONIZATION_UNLOCK, 13, true); public static final int MethodCallBit = 0x002; public static final int ConstructorCallBit = 0x004; public static final int MethodExecutionBit = 0x008; public static final int ConstructorExecutionBit = 0x010; public static final int FieldGetBit = 0x020; public static final int FieldSetBit = 0x040; public static final int StaticInitializationBit = 0x080; public static final int PreInitializationBit = 0x100; public static final int AdviceExecutionBit = 0x200; public static final int InitializationBit = 0x400; public static final int ExceptionHandlerBit = 0x800; public static final int SynchronizationLockBit =0x1000;
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
public static final int SynchronizationUnlockBit=0x2000; public static final int MAX_SHADOW_KIND = 13; public static final Kind[] SHADOW_KINDS = new Kind[] { MethodCall, ConstructorCall, MethodExecution, ConstructorExecution, FieldGet, FieldSet, StaticInitialization, PreInitialization, AdviceExecution, Initialization, ExceptionHandler,SynchronizationLock,SynchronizationUnlock }; public static final int ALL_SHADOW_KINDS_BITS; public static final int NO_SHADOW_KINDS_BITS; static { ALL_SHADOW_KINDS_BITS = 0x3ffe; NO_SHADOW_KINDS_BITS = 0x0000; } /** * Return count of how many bits set in the supplied parameter. */ public static int howMany(int i) { int count = 0; for (int j = 0; j <SHADOW_KINDS.length; j++) { if ((i&SHADOW_KINDS[j].bit)!=0) count++; } return count; } /** A type-safe enum representing the kind of shadows */ public static final class Kind extends TypeSafeEnum {
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
public int bit; public Kind(String name, int key, boolean argsOnStack) { super(name, key); bit = 1<<key; } public String toLegalJavaIdentifier() { return getName().replace('-', '_'); } public boolean argsOnStack() { return !isTargetSameAsThis(); } public boolean allowsExtraction() { return true; } public boolean isSet(int i) { return (i&bit)!=0; } public boolean hasHighPriorityExceptions() { return !isTargetSameAsThis(); } private final static int hasReturnValueFlag =
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
MethodCallBit | ConstructorCallBit | MethodExecutionBit | FieldGetBit | AdviceExecutionBit; /** * These shadow kinds have return values that can be bound in * after returning(Dooberry doo) advice. * @return */ public boolean hasReturnValue() { return (bit&hasReturnValueFlag)!=0; } private final static int isEnclosingKindFlag = MethodExecutionBit | ConstructorExecutionBit | AdviceExecutionBit | StaticInitializationBit | InitializationBit; /** * These are all the shadows that contains other shadows within them and * are often directly associated with methods. */ public boolean isEnclosingKind() { return (bit&isEnclosingKindFlag)!=0; } private final static int isTargetSameAsThisFlag = MethodExecutionBit | ConstructorExecutionBit | StaticInitializationBit | PreInitializationBit | AdviceExecutionBit | InitializationBit; public boolean isTargetSameAsThis() { return (bit&isTargetSameAsThisFlag)!=0; } private final static int neverHasTargetFlag= ConstructorCallBit | ExceptionHandlerBit | PreInitializationBit | StaticInitializationBit | SynchronizationLockBit | SynchronizationUnlockBit;
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
public boolean neverHasTarget() { return (bit&neverHasTargetFlag)!=0; } private final static int neverHasThisFlag= PreInitializationBit | StaticInitializationBit; public boolean neverHasThis() { return (bit&neverHasThisFlag)!=0; } public String getSimpleName() { int dash = getName().lastIndexOf('-'); if (dash == -1) return getName(); else return getName().substring(dash+1); } public static Kind read(DataInputStream s) throws IOException { int key = s.readByte(); switch(key) { case 1: return MethodCall; case 2: return ConstructorCall; case 3: return MethodExecution; case 4: return ConstructorExecution; case 5: return FieldGet; case 6: return FieldSet; case 7: return StaticInitialization; case 8: return PreInitialization; case 9: return AdviceExecution; case 10: return Initialization; case 11: return ExceptionHandler;
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
case 12: return SynchronizationLock; case 13: return SynchronizationUnlock; } throw new BCException("unknown kind: " + key); } } /** * Only does the check if the munger requires it (@AJ aspects don't) * * @param munger * @return */ protected boolean checkMunger(ShadowMunger munger) { if (munger.mustCheckExceptions()) { for (Iterator i = munger.getThrownExceptions().iterator(); i.hasNext(); ) { if (!checkCanThrow(munger, (ResolvedType)i.next() )) return false; } } return true; } protected boolean checkCanThrow(ShadowMunger munger, ResolvedType resolvedTypeX) { if (getKind() == ExceptionHandler) { return true; } if (!isDeclaredException(resolvedTypeX, getSignature())) { getIWorld().showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.CANT_THROW_CHECKED,resolvedTypeX,this), getSourceLocation(), munger.getSourceLocation());
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
} return true; } private boolean isDeclaredException( ResolvedType resolvedTypeX, Member member) { ResolvedType[] excs = getIWorld().resolve(member.getExceptions(getIWorld())); for (int i=0, len=excs.length; i < len; i++) { if (excs[i].isAssignableFrom(resolvedTypeX)) return true; } return false; } public void addMunger(ShadowMunger munger) { if (checkMunger(munger)) { if (mungers==Collections.EMPTY_LIST) mungers = new ArrayList(); this.mungers.add(munger); } } public final void implement() { sortMungers(); if (mungers == null) return; prepareForMungers(); implementMungers(); }
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
private void sortMungers() { List sorted = PartialOrder.sort(mungers); possiblyReportUnorderedAdvice(sorted); if (sorted == null) { for (Iterator i = mungers.iterator(); i.hasNext(); ) { ShadowMunger m = (ShadowMunger)i.next(); getIWorld().getMessageHandler().handleMessage( MessageUtil.error( WeaverMessages.format(WeaverMessages.CIRCULAR_DEPENDENCY,this), m.getSourceLocation())); } } mungers = sorted; } private void possiblyReportUnorderedAdvice(List sorted) { if (sorted!=null && getIWorld().getLint().unorderedAdviceAtShadow.isEnabled() && mungers.size()>1) { Set clashingAspects = new HashSet(); int max = mungers.size(); for (int i = max-1; i >=0; i--) { for (int j=0; j<i; j++) {
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
Object a = mungers.get(i); Object b = mungers.get(j); if (a instanceof BcelAdvice && b instanceof BcelAdvice) { BcelAdvice adviceA = (BcelAdvice)a; BcelAdvice adviceB = (BcelAdvice)b; if (!adviceA.concreteAspect.equals(adviceB.concreteAspect)) { AdviceKind adviceKindA = adviceA.getKind(); AdviceKind adviceKindB = adviceB.getKind(); if (adviceKindA.getKey()<(byte)6 && adviceKindB.getKey()<(byte)6 && adviceKindA.getPrecedence() == adviceKindB.getPrecedence()) { Integer order = getIWorld().getPrecedenceIfAny( adviceA.concreteAspect, adviceB.concreteAspect); if (order!=null && order.equals(new Integer(0))) { String key = adviceA.getDeclaringAspect()+":"+adviceB.getDeclaringAspect(); String possibleExistingKey = adviceB.getDeclaringAspect()+":"+adviceA.getDeclaringAspect(); if (!clashingAspects.contains(possibleExistingKey)) clashingAspects.add(key); } } } }
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
} } for (Iterator iter = clashingAspects.iterator(); iter.hasNext();) { String element = (String) iter.next(); String aspect1 = element.substring(0,element.indexOf(":")); String aspect2 = element.substring(element.indexOf(":")+1); getIWorld().getLint().unorderedAdviceAtShadow.signal( new String[]{this.toString(),aspect1,aspect2}, this.getSourceLocation(),null); } } } /** Prepare the shadow for implementation. After this is done, the shadow * should be in such a position that each munger simply needs to be implemented. */ protected void prepareForMungers() { throw new RuntimeException("Generic shadows cannot be prepared"); } /* * Ensure we report a nice source location - particular in the case * where the source info is missing (binary weave). */ private String beautifyLocation(ISourceLocation isl) { StringBuffer nice = new StringBuffer(); if (isl==null || isl.getSourceFile()==null || isl.getSourceFile().getName().indexOf("no debug info available")!=-1) { nice.append("no debug info available"); } else {
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
int takeFrom = isl.getSourceFile().getPath().lastIndexOf('/'); if (takeFrom == -1) { takeFrom = isl.getSourceFile().getPath().lastIndexOf('\\'); } int binary = isl.getSourceFile().getPath().lastIndexOf('!'); if (binary != -1 && binary < takeFrom) { String pathToBinaryLoc = isl.getSourceFile().getPath().substring(0,binary + 1); if (pathToBinaryLoc.indexOf(".jar") != -1) { int lastSlash = pathToBinaryLoc.lastIndexOf('/'); if (lastSlash == -1) { lastSlash = pathToBinaryLoc.lastIndexOf('\\'); } nice.append(pathToBinaryLoc.substring(lastSlash + 1)); } } nice.append(isl.getSourceFile().getPath().substring(takeFrom +1)); if (isl.getLine()!=0) nice.append(":").append(isl.getLine()); if (isl.getSourceFileName() != null ) nice.append("(from " + isl.getSourceFileName() + ")"); } return nice.toString(); } /* * Report a message about the advice weave that has occurred. Some messing about * to make it pretty ! This code is just asking for an NPE to occur ... */ private void reportWeavingMessage(ShadowMunger munger) {
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
Advice advice = (Advice)munger; AdviceKind aKind = advice.getKind(); if (aKind == null || advice.getConcreteAspect()==null) { return; } if (!( aKind.equals(AdviceKind.Before) || aKind.equals(AdviceKind.After) || aKind.equals(AdviceKind.AfterReturning) || aKind.equals(AdviceKind.AfterThrowing) || aKind.equals(AdviceKind.Around) || aKind.equals(AdviceKind.Softener))) return; if (this.kind==Shadow.SynchronizationUnlock) { if (advice.lastReportedMonitorExitJoinpointLocation==null) { advice.lastReportedMonitorExitJoinpointLocation = getSourceLocation(); } else { if (areTheSame(getSourceLocation(),advice.lastReportedMonitorExitJoinpointLocation)) { advice.lastReportedMonitorExitJoinpointLocation=null; return; }
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
advice.lastReportedMonitorExitJoinpointLocation=getSourceLocation(); } } String description = advice.getKind().toString(); String advisedType = this.getEnclosingType().getName(); String advisingType= advice.getConcreteAspect().getName(); Message msg = null; if (advice.getKind().equals(AdviceKind.Softener)) { msg = WeaveMessage.constructWeavingMessage( WeaveMessage.WEAVEMESSAGE_SOFTENS, new String[]{advisedType,beautifyLocation(getSourceLocation()), advisingType,beautifyLocation(munger.getSourceLocation())}, advisedType, advisingType); } else { boolean runtimeTest = ((BcelAdvice)advice).hasDynamicTests(); String joinPointDescription = this.toString(); msg = WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ADVISES, new String[]{ joinPointDescription, advisedType, beautifyLocation(getSourceLocation()), description, advisingType,beautifyLocation(munger.getSourceLocation()), (runtimeTest?" [with runtime test]":"")}, advisedType, advisingType); } getIWorld().getMessageHandler().handleMessage(msg); } private boolean areTheSame(ISourceLocation locA, ISourceLocation locB) {
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
if (locA==null) return locB==null; if (locB==null) return false; if (locA.getLine()!=locB.getLine()) return false; File fA = locA.getSourceFile(); File fB = locA.getSourceFile(); if (fA==null) return fB==null; if (fB==null) return false; return fA.getName().equals(fB.getName()); } public IRelationship.Kind determineRelKind(ShadowMunger munger) { AdviceKind ak = ((Advice)munger).getKind(); if (ak.getKey()==AdviceKind.Before.getKey()) return IRelationship.Kind.ADVICE_BEFORE; else if (ak.getKey()==AdviceKind.After.getKey()) return IRelationship.Kind.ADVICE_AFTER; else if (ak.getKey()==AdviceKind.AfterThrowing.getKey()) return IRelationship.Kind.ADVICE_AFTERTHROWING; else if (ak.getKey()==AdviceKind.AfterReturning.getKey()) return IRelationship.Kind.ADVICE_AFTERRETURNING; else if (ak.getKey()==AdviceKind.Around.getKey()) return IRelationship.Kind.ADVICE_AROUND; else if (ak.getKey()==AdviceKind.CflowEntry.getKey() || ak.getKey()==AdviceKind.CflowBelowEntry.getKey() || ak.getKey()==AdviceKind.InterInitializer.getKey() || ak.getKey()==AdviceKind.PerCflowEntry.getKey() || ak.getKey()==AdviceKind.PerCflowBelowEntry.getKey() || ak.getKey()==AdviceKind.PerThisEntry.getKey() || ak.getKey()==AdviceKind.PerTargetEntry.getKey() || ak.getKey()==AdviceKind.Softener.getKey() || ak.getKey()==AdviceKind.PerTypeWithinEntry.getKey()) {
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
return null; } throw new RuntimeException("Shadow.determineRelKind: What the hell is it? "+ak); } private void implementMungers() { World world = getIWorld(); for (Iterator iter = mungers.iterator(); iter.hasNext();) { ShadowMunger munger = (ShadowMunger) iter.next(); munger.implementOn(this); if (world.getCrossReferenceHandler() != null) { world.getCrossReferenceHandler().addCrossReference( munger.getSourceLocation(), this.getSourceLocation(), determineRelKind(munger), ((BcelAdvice)munger).hasDynamicTests() ); } if (!getIWorld().getMessageHandler().isIgnoring(IMessage.WEAVEINFO)) { reportWeavingMessage(munger); } if (world.getModel() != null) { AsmRelationshipProvider.getDefault().adviceMunger(world.getModel(), this, munger); }
220,172
Bug 220172 [compiler] NullpointerException during compile
null
resolved fixed
5beab0e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-25T21:39:45Z
2008-02-25T11:46:40Z
weaver/src/org/aspectj/weaver/Shadow.java
} } public String makeReflectiveFactoryString() { return null; } public abstract ISourceLocation getSourceLocation(); public String toString() { return getKind() + "(" + getSignature() + ")"; } public String toResolvedString(World world) { return getKind() + "(" + world.resolve(getSignature()).toGenericString() + ")"; } /** * Convert a bit array for the shadow kinds into a set of them... should only * be used for testing - mainline code should do bit manipulation! */ public static Set toSet(int i) { Set results = new HashSet(); for (int j = 0; j < Shadow.SHADOW_KINDS.length; j++) { Kind k = Shadow.SHADOW_KINDS[j]; if (k.isSet(i)) results.add(k); } return results; } }
220,430
Bug 220430 mixup in retrieving the right class in Java15AnnotationFinder
null
resolved fixed
9bbdb41
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T21:03:19Z
2008-02-26T18:20:00Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
/* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html
220,430
Bug 220430 mixup in retrieving the right class in Java15AnnotationFinder
null
resolved fixed
9bbdb41
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T21:03:19Z
2008-02-26T18:20:00Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
* * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.weaver.reflect; import java.lang.annotation.Annotation; import java.lang.reflect.AccessibleObject; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Member; import java.lang.reflect.Method; import java.util.Collections; import java.util.HashSet; import java.util.Set; import org.aspectj.apache.bcel.classfile.AnnotationDefault; import org.aspectj.apache.bcel.classfile.Attribute; import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.LocalVariable; import org.aspectj.apache.bcel.classfile.LocalVariableTable; import org.aspectj.apache.bcel.util.NonCachingClassLoaderRepository; import org.aspectj.apache.bcel.util.Repository; import org.aspectj.weaver.AnnotationX; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.World; /** * Find the given annotation (if present) on the given object * */ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder {
220,430
Bug 220430 mixup in retrieving the right class in Java15AnnotationFinder
null
resolved fixed
9bbdb41
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T21:03:19Z
2008-02-26T18:20:00Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
private Repository bcelRepository; private ClassLoader classLoader; private World world; public Java15AnnotationFinder() { } public void setClassLoader(ClassLoader aLoader) { this.bcelRepository = new NonCachingClassLoaderRepository(aLoader); this.classLoader = aLoader; } public void setWorld(World aWorld) { this.world = aWorld; } /* (non-Javadoc) * @see org.aspectj.weaver.reflect.AnnotationFinder#getAnnotation(org.aspectj.weaver.ResolvedType, java.lang.Object) */ public Object getAnnotation(ResolvedType annotationType, Object onObject) { try {
220,430
Bug 220430 mixup in retrieving the right class in Java15AnnotationFinder
null
resolved fixed
9bbdb41
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T21:03:19Z
2008-02-26T18:20:00Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
Class<? extends Annotation> annotationClass = (Class<? extends Annotation>) Class.forName(annotationType.getName(),false,classLoader); if (onObject.getClass().isAnnotationPresent(annotationClass)) { return onObject.getClass().getAnnotation(annotationClass); } } catch (ClassNotFoundException ex) { } return null; } public Object getAnnotationFromClass(ResolvedType annotationType, Class aClass) { try { Class<? extends Annotation> annotationClass = (Class<? extends Annotation>) Class.forName(annotationType.getName(),false,classLoader); if (aClass.isAnnotationPresent(annotationClass)) { return aClass.getAnnotation(annotationClass); } } catch (ClassNotFoundException ex) { } return null; } public Object getAnnotationFromMember(ResolvedType annotationType, Member aMember) { if (!(aMember instanceof AccessibleObject)) return null; AccessibleObject ao = (AccessibleObject) aMember; try { Class annotationClass = Class.forName(annotationType.getName(),false,classLoader); if (ao.isAnnotationPresent(annotationClass)) { return ao.getAnnotation(annotationClass); } } catch (ClassNotFoundException ex) {
220,430
Bug 220430 mixup in retrieving the right class in Java15AnnotationFinder
null
resolved fixed
9bbdb41
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T21:03:19Z
2008-02-26T18:20:00Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
} return null; } public AnnotationX getAnnotationOfType(UnresolvedType ofType,Member onMember) { if (!(onMember instanceof AccessibleObject)) return null; try { JavaClass jc = bcelRepository.loadClass(onMember.getDeclaringClass()); org.aspectj.apache.bcel.classfile.annotation.Annotation[] anns = new org.aspectj.apache.bcel.classfile.annotation.Annotation[0]; if (onMember instanceof Method) { org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember); if (bcelMethod == null) { System.err.println("Unexpected problem in Java15AnnotationFinder: cannot retrieve annotations on method '"+onMember.getName()+"' in class '"+jc.getClassName()+"'"); } else { anns = bcelMethod.getAnnotations(); } } else if (onMember instanceof Constructor) { org.aspectj.apache.bcel.classfile.Method bcelCons = jc.getMethod((Constructor)onMember); anns = bcelCons.getAnnotations(); } else if (onMember instanceof Field) { org.aspectj.apache.bcel.classfile.Field bcelField = jc.getField((Field)onMember); anns = bcelField.getAnnotations(); } bcelRepository.clear(); if (anns == null) anns = new org.aspectj.apache.bcel.classfile.annotation.Annotation[0];
220,430
Bug 220430 mixup in retrieving the right class in Java15AnnotationFinder
null
resolved fixed
9bbdb41
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T21:03:19Z
2008-02-26T18:20:00Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
for (int i=0;i<anns.length;i++) { if (anns[i].getTypeSignature().equals(ofType.getSignature())) { return new AnnotationX(anns[i],world); } } return null; } catch (ClassNotFoundException cnfEx) { } return null; } public String getAnnotationDefaultValue(Member onMember) { try { JavaClass jc = bcelRepository.loadClass(onMember.getDeclaringClass()); if (onMember instanceof Method) { org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember); if (bcelMethod == null) { System.err.println("Unexpected problem in Java15AnnotationFinder: cannot retrieve annotations on method '"+onMember.getName()+"' in class '"+jc.getClassName()+"'"); } else { Attribute[] attrs = bcelMethod.getAttributes(); for (int i = 0; i < attrs.length; i++) { Attribute attribute = attrs[i]; if (attribute.getName().equals("AnnotationDefault")) { AnnotationDefault def = (AnnotationDefault)attribute; return def.getElementValue().stringifyValue(); } }
220,430
Bug 220430 mixup in retrieving the right class in Java15AnnotationFinder
null
resolved fixed
9bbdb41
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T21:03:19Z
2008-02-26T18:20:00Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
return null; } } } catch (ClassNotFoundException cnfEx) { } return null; } public Set getAnnotations(Member onMember) { if (!(onMember instanceof AccessibleObject)) return Collections.EMPTY_SET; try { JavaClass jc = bcelRepository.loadClass(onMember.getDeclaringClass()); org.aspectj.apache.bcel.classfile.annotation.Annotation[] anns = new org.aspectj.apache.bcel.classfile.annotation.Annotation[0]; if (onMember instanceof Method) { org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember); if (bcelMethod == null) { System.err.println("Unexpected problem in Java15AnnotationFinder: cannot retrieve annotations on method '"+onMember.getName()+"' in class '"+jc.getClassName()+"'"); } else { anns = bcelMethod.getAnnotations(); } } else if (onMember instanceof Constructor) { org.aspectj.apache.bcel.classfile.Method bcelCons = jc.getMethod((Constructor)onMember); anns = bcelCons.getAnnotations(); } else if (onMember instanceof Field) { org.aspectj.apache.bcel.classfile.Field bcelField = jc.getField((Field)onMember);
220,430
Bug 220430 mixup in retrieving the right class in Java15AnnotationFinder
null
resolved fixed
9bbdb41
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T21:03:19Z
2008-02-26T18:20:00Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
anns = bcelField.getAnnotations(); } bcelRepository.clear(); if (anns == null) anns = new org.aspectj.apache.bcel.classfile.annotation.Annotation[0]; Set<ResolvedType> annSet = new HashSet<ResolvedType>(); for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } return annSet; } catch (ClassNotFoundException cnfEx) { } AccessibleObject ao = (AccessibleObject) onMember; Annotation[] anns = ao.getDeclaredAnnotations(); Set<UnresolvedType> annSet = new HashSet<UnresolvedType>(); for (int i = 0; i < anns.length; i++) { annSet.add(UnresolvedType.forName(anns[i].annotationType().getName()).resolve(world)); } return annSet; } public ResolvedType[] getAnnotations(Class forClass, World inWorld) { try {
220,430
Bug 220430 mixup in retrieving the right class in Java15AnnotationFinder
null
resolved fixed
9bbdb41
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T21:03:19Z
2008-02-26T18:20:00Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
JavaClass jc = bcelRepository.loadClass(forClass); org.aspectj.apache.bcel.classfile.annotation.Annotation[] anns =jc.getAnnotations(); bcelRepository.clear(); if (anns == null) return new ResolvedType[0]; ResolvedType[] ret = new ResolvedType[anns.length]; for (int i = 0; i < ret.length; i++) { ret[i] = inWorld.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature())); } return ret; } catch (ClassNotFoundException cnfEx) { } Annotation[] classAnnotations = forClass.getAnnotations(); ResolvedType[] ret = new ResolvedType[classAnnotations.length]; for (int i = 0; i < classAnnotations.length; i++) { ret[i] = inWorld.resolve(classAnnotations[i].annotationType().getName()); } return ret; } public String[] getParameterNames(Member forMember) { if (!(forMember instanceof AccessibleObject)) return null; try { JavaClass jc = bcelRepository.loadClass(forMember.getDeclaringClass()); LocalVariableTable lvt = null; int numVars = 0; if (forMember instanceof Method) {
220,430
Bug 220430 mixup in retrieving the right class in Java15AnnotationFinder
null
resolved fixed
9bbdb41
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T21:03:19Z
2008-02-26T18:20:00Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)forMember); lvt = bcelMethod.getLocalVariableTable(); numVars = bcelMethod.getArgumentTypes().length; } else if (forMember instanceof Constructor) { org.aspectj.apache.bcel.classfile.Method bcelCons = jc.getMethod((Constructor)forMember); lvt = bcelCons.getLocalVariableTable(); numVars = bcelCons.getArgumentTypes().length; } return getParameterNamesFromLVT(lvt,numVars); } catch (ClassNotFoundException cnfEx) { ; } return null; } private String[] getParameterNamesFromLVT(LocalVariableTable lvt, int numVars) { LocalVariable[] vars = lvt.getLocalVariableTable(); if (vars.length < numVars) { return null; } String[] ret = new String[numVars]; for(int i = 0; i < numVars; i++) { ret[i] = vars[i+1].getName(); } return ret; } public static final ResolvedType[][] NO_PARAMETER_ANNOTATIONS = new ResolvedType[][]{};
220,430
Bug 220430 mixup in retrieving the right class in Java15AnnotationFinder
null
resolved fixed
9bbdb41
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T21:03:19Z
2008-02-26T18:20:00Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
public ResolvedType[][] getParameterAnnotationTypes(Member onMember) { if (!(onMember instanceof AccessibleObject)) return NO_PARAMETER_ANNOTATIONS; try { JavaClass jc = bcelRepository.loadClass(onMember.getDeclaringClass()); org.aspectj.apache.bcel.classfile.annotation.Annotation[][] anns = null; if (onMember instanceof Method) { org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember); anns = bcelMethod.getParameterAnnotations(); } else if (onMember instanceof Constructor) { org.aspectj.apache.bcel.classfile.Method bcelCons = jc.getMethod((Constructor)onMember); anns = bcelCons.getParameterAnnotations(); } else if (onMember instanceof Field) { anns = null; } bcelRepository.clear(); if (anns == null) return NO_PARAMETER_ANNOTATIONS; ResolvedType[][] result = new ResolvedType[anns.length][]; for (int i=0;i<anns.length;i++) { if (anns[i]!=null) { result[i] = new ResolvedType[anns[i].length]; for (int j=0;j<anns[i].length;j++) { result[i][j] = world.resolve(UnresolvedType.forSignature(anns[i][j].getTypeSignature())); } } }
220,430
Bug 220430 mixup in retrieving the right class in Java15AnnotationFinder
null
resolved fixed
9bbdb41
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T21:03:19Z
2008-02-26T18:20:00Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
return result; } catch (ClassNotFoundException cnfEx) { } AccessibleObject ao = (AccessibleObject) onMember; Annotation[][] anns = null; if (onMember instanceof Method) { anns = ((Method)ao).getParameterAnnotations(); } else if (onMember instanceof Constructor) { anns = ((Constructor)ao).getParameterAnnotations(); } else if (onMember instanceof Field) { anns = null; } if (anns == null) return NO_PARAMETER_ANNOTATIONS; ResolvedType[][] result = new ResolvedType[anns.length][]; for (int i=0;i<anns.length;i++) { if (anns[i]!=null) { result[i] = new ResolvedType[anns[i].length]; for (int j=0;j<anns[i].length;j++) { result[i][j] = UnresolvedType.forName(anns[i][j].annotationType().getName()).resolve(world); } } } return result; } }
219,830
Bug 219830 java.lang.NullPointerException in Java15AnnotationFinder when using SWT
I receive the following Exception when running SWT with AspjectJ load time weaving through the Spring Framework. The lines around org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) are as follows: for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } When using the debugger, I see "world" as a null value. Attached is a stripped down Eclipse project that generates the error during startup. My runtime arguments are as follows: -javaagent:${resource_loc:/AspectJBug/lib/spring-agent.jar} -------------------------------------------- [AppClassLoader@19d819d8] abort trouble in: final class org.eclipse.swt.awt.SWT_AWT$10 extends java.lang.Object implements java.lang.Runnable: private final java.awt.Frame val$frame [Synthetic] void <init>(java.awt.Frame): ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 274) INVOKESPECIAL java.lang.Object.<init> ()V constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 1) | ALOAD_1 | PUTFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | RETURN constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) end void <init>(java.awt.Frame) public void run(): method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) | catch java.lang.Throwable -> E0 | | LDC "sun.awt.windows.WComponentPeer" (line 277) | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | ASTORE_1 | | ALOAD_1 // Ljava/lang/Class; clazz (line 278) | | LDC "winGraphicsConfig" | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | | INVOKEVIRTUAL java.lang.Class.getDeclaredField (Ljava/lang/String;)Ljava/lang/reflect/Field; | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | ASTORE_2 | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 279) | | ICONST_1 | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | | INVOKEVIRTUAL java.lang.reflect.Field.setAccessible (Z)V | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 280) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | | INVOKEVIRTUAL java.awt.Frame.getPeer ()Ljava/awt/peer/ComponentPeer; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | INVOKEVIRTUAL java.awt.Frame.getGraphicsConfiguration ()Ljava/awt/GraphicsConfiguration; | | INVOKEVIRTUAL java.lang.reflect.Field.set (Ljava/lang/Object;Ljava/lang/Object;)V | catch java.lang.Throwable -> E0 | GOTO L0 | E0: POP (line 281) | L0: RETURN (line 282) method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) end public void run() end final class org.eclipse.swt.awt.SWT_AWT$10 -- (NullPointerException) null null java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274) Feb 21, 2008 12:09:23 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: org/eclipse/swt/awt/SWT_AWT$10 java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274)
resolved fixed
1bbe6f9
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T23:54:38Z
2008-02-21T18:53:20Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java
/* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html *
219,830
Bug 219830 java.lang.NullPointerException in Java15AnnotationFinder when using SWT
I receive the following Exception when running SWT with AspjectJ load time weaving through the Spring Framework. The lines around org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) are as follows: for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } When using the debugger, I see "world" as a null value. Attached is a stripped down Eclipse project that generates the error during startup. My runtime arguments are as follows: -javaagent:${resource_loc:/AspectJBug/lib/spring-agent.jar} -------------------------------------------- [AppClassLoader@19d819d8] abort trouble in: final class org.eclipse.swt.awt.SWT_AWT$10 extends java.lang.Object implements java.lang.Runnable: private final java.awt.Frame val$frame [Synthetic] void <init>(java.awt.Frame): ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 274) INVOKESPECIAL java.lang.Object.<init> ()V constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 1) | ALOAD_1 | PUTFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | RETURN constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) end void <init>(java.awt.Frame) public void run(): method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) | catch java.lang.Throwable -> E0 | | LDC "sun.awt.windows.WComponentPeer" (line 277) | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | ASTORE_1 | | ALOAD_1 // Ljava/lang/Class; clazz (line 278) | | LDC "winGraphicsConfig" | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | | INVOKEVIRTUAL java.lang.Class.getDeclaredField (Ljava/lang/String;)Ljava/lang/reflect/Field; | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | ASTORE_2 | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 279) | | ICONST_1 | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | | INVOKEVIRTUAL java.lang.reflect.Field.setAccessible (Z)V | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 280) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | | INVOKEVIRTUAL java.awt.Frame.getPeer ()Ljava/awt/peer/ComponentPeer; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | INVOKEVIRTUAL java.awt.Frame.getGraphicsConfiguration ()Ljava/awt/GraphicsConfiguration; | | INVOKEVIRTUAL java.lang.reflect.Field.set (Ljava/lang/Object;Ljava/lang/Object;)V | catch java.lang.Throwable -> E0 | GOTO L0 | E0: POP (line 281) | L0: RETURN (line 282) method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) end public void run() end final class org.eclipse.swt.awt.SWT_AWT$10 -- (NullPointerException) null null java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274) Feb 21, 2008 12:09:23 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: org/eclipse/swt/awt/SWT_AWT$10 java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274)
resolved fixed
1bbe6f9
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T23:54:38Z
2008-02-21T18:53:20Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java
* Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.weaver.reflect; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Type; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.reflect.AjType; import org.aspectj.lang.reflect.AjTypeSystem; import org.aspectj.lang.reflect.Pointcut; import org.aspectj.weaver.AnnotationX; import org.aspectj.weaver.ReferenceType; import org.aspectj.weaver.ResolvedMember; import org.aspectj.weaver.ResolvedPointcutDefinition; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.TypeVariable; import org.aspectj.weaver.TypeVariableReferenceType; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.World; import org.aspectj.weaver.tools.PointcutParameter; /** * @author colyer * Provides Java 5 behaviour in reflection based delegates (overriding * 1.4 behaviour from superclass where appropriate) */ public class Java15ReflectionBasedReferenceTypeDelegate extends
219,830
Bug 219830 java.lang.NullPointerException in Java15AnnotationFinder when using SWT
I receive the following Exception when running SWT with AspjectJ load time weaving through the Spring Framework. The lines around org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) are as follows: for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } When using the debugger, I see "world" as a null value. Attached is a stripped down Eclipse project that generates the error during startup. My runtime arguments are as follows: -javaagent:${resource_loc:/AspectJBug/lib/spring-agent.jar} -------------------------------------------- [AppClassLoader@19d819d8] abort trouble in: final class org.eclipse.swt.awt.SWT_AWT$10 extends java.lang.Object implements java.lang.Runnable: private final java.awt.Frame val$frame [Synthetic] void <init>(java.awt.Frame): ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 274) INVOKESPECIAL java.lang.Object.<init> ()V constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 1) | ALOAD_1 | PUTFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | RETURN constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) end void <init>(java.awt.Frame) public void run(): method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) | catch java.lang.Throwable -> E0 | | LDC "sun.awt.windows.WComponentPeer" (line 277) | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | ASTORE_1 | | ALOAD_1 // Ljava/lang/Class; clazz (line 278) | | LDC "winGraphicsConfig" | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | | INVOKEVIRTUAL java.lang.Class.getDeclaredField (Ljava/lang/String;)Ljava/lang/reflect/Field; | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | ASTORE_2 | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 279) | | ICONST_1 | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | | INVOKEVIRTUAL java.lang.reflect.Field.setAccessible (Z)V | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 280) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | | INVOKEVIRTUAL java.awt.Frame.getPeer ()Ljava/awt/peer/ComponentPeer; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | INVOKEVIRTUAL java.awt.Frame.getGraphicsConfiguration ()Ljava/awt/GraphicsConfiguration; | | INVOKEVIRTUAL java.lang.reflect.Field.set (Ljava/lang/Object;Ljava/lang/Object;)V | catch java.lang.Throwable -> E0 | GOTO L0 | E0: POP (line 281) | L0: RETURN (line 282) method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) end public void run() end final class org.eclipse.swt.awt.SWT_AWT$10 -- (NullPointerException) null null java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274) Feb 21, 2008 12:09:23 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: org/eclipse/swt/awt/SWT_AWT$10 java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274)
resolved fixed
1bbe6f9
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T23:54:38Z
2008-02-21T18:53:20Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java
ReflectionBasedReferenceTypeDelegate { private AjType<?> myType; private ResolvedType[] annotations; private ResolvedMember[] pointcuts; private ResolvedMember[] methods; private ResolvedMember[] fields; private TypeVariable[] typeVariables; private ResolvedType superclass; private ResolvedType[] superInterfaces; private String genericSignature = null; private JavaLangTypeToResolvedTypeConverter typeConverter; private Java15AnnotationFinder annotationFinder = null; private ArgNameFinder argNameFinder = null; public Java15ReflectionBasedReferenceTypeDelegate() {} @Override public void initialize(ReferenceType aType, Class aClass, ClassLoader classLoader, World aWorld) { super.initialize(aType, aClass, classLoader, aWorld); myType = AjTypeSystem.getAjType(aClass); annotationFinder = new Java15AnnotationFinder(); argNameFinder = annotationFinder;
219,830
Bug 219830 java.lang.NullPointerException in Java15AnnotationFinder when using SWT
I receive the following Exception when running SWT with AspjectJ load time weaving through the Spring Framework. The lines around org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) are as follows: for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } When using the debugger, I see "world" as a null value. Attached is a stripped down Eclipse project that generates the error during startup. My runtime arguments are as follows: -javaagent:${resource_loc:/AspectJBug/lib/spring-agent.jar} -------------------------------------------- [AppClassLoader@19d819d8] abort trouble in: final class org.eclipse.swt.awt.SWT_AWT$10 extends java.lang.Object implements java.lang.Runnable: private final java.awt.Frame val$frame [Synthetic] void <init>(java.awt.Frame): ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 274) INVOKESPECIAL java.lang.Object.<init> ()V constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 1) | ALOAD_1 | PUTFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | RETURN constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) end void <init>(java.awt.Frame) public void run(): method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) | catch java.lang.Throwable -> E0 | | LDC "sun.awt.windows.WComponentPeer" (line 277) | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | ASTORE_1 | | ALOAD_1 // Ljava/lang/Class; clazz (line 278) | | LDC "winGraphicsConfig" | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | | INVOKEVIRTUAL java.lang.Class.getDeclaredField (Ljava/lang/String;)Ljava/lang/reflect/Field; | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | ASTORE_2 | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 279) | | ICONST_1 | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | | INVOKEVIRTUAL java.lang.reflect.Field.setAccessible (Z)V | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 280) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | | INVOKEVIRTUAL java.awt.Frame.getPeer ()Ljava/awt/peer/ComponentPeer; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | INVOKEVIRTUAL java.awt.Frame.getGraphicsConfiguration ()Ljava/awt/GraphicsConfiguration; | | INVOKEVIRTUAL java.lang.reflect.Field.set (Ljava/lang/Object;Ljava/lang/Object;)V | catch java.lang.Throwable -> E0 | GOTO L0 | E0: POP (line 281) | L0: RETURN (line 282) method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) end public void run() end final class org.eclipse.swt.awt.SWT_AWT$10 -- (NullPointerException) null null java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274) Feb 21, 2008 12:09:23 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: org/eclipse/swt/awt/SWT_AWT$10 java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274)
resolved fixed
1bbe6f9
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T23:54:38Z
2008-02-21T18:53:20Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java
annotationFinder.setClassLoader(this.classLoader); this.typeConverter = new JavaLangTypeToResolvedTypeConverter(aWorld); } public ReferenceType buildGenericType() { return (ReferenceType) UnresolvedType.forGenericTypeVariables( getResolvedTypeX().getSignature(), getTypeVariables()).resolve(getWorld()); } public AnnotationX[] getAnnotations() { return super.getAnnotations(); } public ResolvedType[] getAnnotationTypes() { if (annotations == null) { annotations = annotationFinder.getAnnotations(getBaseClass(), getWorld()); } return annotations; } public boolean hasAnnotation(UnresolvedType ofType) { ResolvedType[] myAnns = getAnnotationTypes(); ResolvedType toLookFor = ofType.resolve(getWorld()); for (int i = 0; i < myAnns.length; i++) { if (myAnns[i] == toLookFor) return true; }
219,830
Bug 219830 java.lang.NullPointerException in Java15AnnotationFinder when using SWT
I receive the following Exception when running SWT with AspjectJ load time weaving through the Spring Framework. The lines around org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) are as follows: for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } When using the debugger, I see "world" as a null value. Attached is a stripped down Eclipse project that generates the error during startup. My runtime arguments are as follows: -javaagent:${resource_loc:/AspectJBug/lib/spring-agent.jar} -------------------------------------------- [AppClassLoader@19d819d8] abort trouble in: final class org.eclipse.swt.awt.SWT_AWT$10 extends java.lang.Object implements java.lang.Runnable: private final java.awt.Frame val$frame [Synthetic] void <init>(java.awt.Frame): ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 274) INVOKESPECIAL java.lang.Object.<init> ()V constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 1) | ALOAD_1 | PUTFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | RETURN constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) end void <init>(java.awt.Frame) public void run(): method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) | catch java.lang.Throwable -> E0 | | LDC "sun.awt.windows.WComponentPeer" (line 277) | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | ASTORE_1 | | ALOAD_1 // Ljava/lang/Class; clazz (line 278) | | LDC "winGraphicsConfig" | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | | INVOKEVIRTUAL java.lang.Class.getDeclaredField (Ljava/lang/String;)Ljava/lang/reflect/Field; | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | ASTORE_2 | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 279) | | ICONST_1 | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | | INVOKEVIRTUAL java.lang.reflect.Field.setAccessible (Z)V | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 280) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | | INVOKEVIRTUAL java.awt.Frame.getPeer ()Ljava/awt/peer/ComponentPeer; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | INVOKEVIRTUAL java.awt.Frame.getGraphicsConfiguration ()Ljava/awt/GraphicsConfiguration; | | INVOKEVIRTUAL java.lang.reflect.Field.set (Ljava/lang/Object;Ljava/lang/Object;)V | catch java.lang.Throwable -> E0 | GOTO L0 | E0: POP (line 281) | L0: RETURN (line 282) method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) end public void run() end final class org.eclipse.swt.awt.SWT_AWT$10 -- (NullPointerException) null null java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274) Feb 21, 2008 12:09:23 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: org/eclipse/swt/awt/SWT_AWT$10 java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274)
resolved fixed
1bbe6f9
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T23:54:38Z
2008-02-21T18:53:20Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java
return false; } public ResolvedMember[] getDeclaredFields() { if (fields == null) { Field[] reflectFields = this.myType.getDeclaredFields(); this.fields = new ResolvedMember[reflectFields.length]; for (int i = 0; i < reflectFields.length; i++) { this.fields[i] = createGenericFieldMember(reflectFields[i]); } } return fields; } public String getDeclaredGenericSignature() { if (this.genericSignature == null && isGeneric()) { } return genericSignature; } public ResolvedType[] getDeclaredInterfaces() { if (superInterfaces == null) { Type[] genericInterfaces = getBaseClass().getGenericInterfaces(); this.superInterfaces = typeConverter.fromTypes(genericInterfaces); } return superInterfaces; }
219,830
Bug 219830 java.lang.NullPointerException in Java15AnnotationFinder when using SWT
I receive the following Exception when running SWT with AspjectJ load time weaving through the Spring Framework. The lines around org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) are as follows: for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } When using the debugger, I see "world" as a null value. Attached is a stripped down Eclipse project that generates the error during startup. My runtime arguments are as follows: -javaagent:${resource_loc:/AspectJBug/lib/spring-agent.jar} -------------------------------------------- [AppClassLoader@19d819d8] abort trouble in: final class org.eclipse.swt.awt.SWT_AWT$10 extends java.lang.Object implements java.lang.Runnable: private final java.awt.Frame val$frame [Synthetic] void <init>(java.awt.Frame): ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 274) INVOKESPECIAL java.lang.Object.<init> ()V constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 1) | ALOAD_1 | PUTFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | RETURN constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) end void <init>(java.awt.Frame) public void run(): method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) | catch java.lang.Throwable -> E0 | | LDC "sun.awt.windows.WComponentPeer" (line 277) | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | ASTORE_1 | | ALOAD_1 // Ljava/lang/Class; clazz (line 278) | | LDC "winGraphicsConfig" | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | | INVOKEVIRTUAL java.lang.Class.getDeclaredField (Ljava/lang/String;)Ljava/lang/reflect/Field; | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | ASTORE_2 | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 279) | | ICONST_1 | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | | INVOKEVIRTUAL java.lang.reflect.Field.setAccessible (Z)V | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 280) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | | INVOKEVIRTUAL java.awt.Frame.getPeer ()Ljava/awt/peer/ComponentPeer; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | INVOKEVIRTUAL java.awt.Frame.getGraphicsConfiguration ()Ljava/awt/GraphicsConfiguration; | | INVOKEVIRTUAL java.lang.reflect.Field.set (Ljava/lang/Object;Ljava/lang/Object;)V | catch java.lang.Throwable -> E0 | GOTO L0 | E0: POP (line 281) | L0: RETURN (line 282) method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) end public void run() end final class org.eclipse.swt.awt.SWT_AWT$10 -- (NullPointerException) null null java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274) Feb 21, 2008 12:09:23 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: org/eclipse/swt/awt/SWT_AWT$10 java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274)
resolved fixed
1bbe6f9
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T23:54:38Z
2008-02-21T18:53:20Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java
public ResolvedType getSuperclass() { if (superclass == null && getBaseClass()!=Object.class) { Type t = this.getBaseClass().getGenericSuperclass(); if (t!=null) superclass = typeConverter.fromType(t); if (t==null) superclass = getWorld().resolve(UnresolvedType.OBJECT); } return superclass; } public TypeVariable[] getTypeVariables() { TypeVariable[] workInProgressSetOfVariables = (TypeVariable[])getResolvedTypeX().getWorld().getTypeVariablesCurrentlyBeingProcessed(getBaseClass()); if (workInProgressSetOfVariables!=null) { return workInProgressSetOfVariables; } if (this.typeVariables == null) { java.lang.reflect.TypeVariable[] tVars = this.getBaseClass().getTypeParameters(); this.typeVariables = new TypeVariable[tVars.length]; for (int i = 0; i < tVars.length; i++) { typeVariables[i] = new TypeVariable(tVars[i].getName()); } this.getResolvedTypeX().getWorld().recordTypeVariablesCurrentlyBeingProcessed(getBaseClass(),typeVariables); for (int i = 0; i < tVars.length; i++) { TypeVariableReferenceType tvrt = ((TypeVariableReferenceType) typeConverter.fromType(tVars[i])); TypeVariable tv = tvrt.getTypeVariable(); typeVariables[i].setUpperBound(tv.getUpperBound()); typeVariables[i].setAdditionalInterfaceBounds(tv.getAdditionalInterfaceBounds());
219,830
Bug 219830 java.lang.NullPointerException in Java15AnnotationFinder when using SWT
I receive the following Exception when running SWT with AspjectJ load time weaving through the Spring Framework. The lines around org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) are as follows: for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } When using the debugger, I see "world" as a null value. Attached is a stripped down Eclipse project that generates the error during startup. My runtime arguments are as follows: -javaagent:${resource_loc:/AspectJBug/lib/spring-agent.jar} -------------------------------------------- [AppClassLoader@19d819d8] abort trouble in: final class org.eclipse.swt.awt.SWT_AWT$10 extends java.lang.Object implements java.lang.Runnable: private final java.awt.Frame val$frame [Synthetic] void <init>(java.awt.Frame): ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 274) INVOKESPECIAL java.lang.Object.<init> ()V constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 1) | ALOAD_1 | PUTFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | RETURN constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) end void <init>(java.awt.Frame) public void run(): method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) | catch java.lang.Throwable -> E0 | | LDC "sun.awt.windows.WComponentPeer" (line 277) | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | ASTORE_1 | | ALOAD_1 // Ljava/lang/Class; clazz (line 278) | | LDC "winGraphicsConfig" | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | | INVOKEVIRTUAL java.lang.Class.getDeclaredField (Ljava/lang/String;)Ljava/lang/reflect/Field; | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | ASTORE_2 | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 279) | | ICONST_1 | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | | INVOKEVIRTUAL java.lang.reflect.Field.setAccessible (Z)V | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 280) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | | INVOKEVIRTUAL java.awt.Frame.getPeer ()Ljava/awt/peer/ComponentPeer; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | INVOKEVIRTUAL java.awt.Frame.getGraphicsConfiguration ()Ljava/awt/GraphicsConfiguration; | | INVOKEVIRTUAL java.lang.reflect.Field.set (Ljava/lang/Object;Ljava/lang/Object;)V | catch java.lang.Throwable -> E0 | GOTO L0 | E0: POP (line 281) | L0: RETURN (line 282) method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) end public void run() end final class org.eclipse.swt.awt.SWT_AWT$10 -- (NullPointerException) null null java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274) Feb 21, 2008 12:09:23 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: org/eclipse/swt/awt/SWT_AWT$10 java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274)
resolved fixed
1bbe6f9
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T23:54:38Z
2008-02-21T18:53:20Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java
typeVariables[i].setDeclaringElement(tv.getDeclaringElement()); typeVariables[i].setDeclaringElementKind(tv.getDeclaringElementKind()); typeVariables[i].setRank(tv.getRank()); typeVariables[i].setLowerBound(tv.getLowerBound()); } this.getResolvedTypeX().getWorld().forgetTypeVariablesCurrentlyBeingProcessed(getBaseClass()); } return this.typeVariables; } public ResolvedMember[] getDeclaredMethods() { if (methods == null) { Method[] reflectMethods = this.myType.getDeclaredMethods(); Constructor[] reflectCons = this.myType.getDeclaredConstructors(); this.methods = new ResolvedMember[reflectMethods.length + reflectCons.length]; for (int i = 0; i < reflectMethods.length; i++) { this.methods[i] = createGenericMethodMember(reflectMethods[i]); } for (int i = 0; i < reflectCons.length; i++) { this.methods[i + reflectMethods.length] = createGenericConstructorMember(reflectCons[i]); } } return methods; } /** * Returns the generic type, regardless of the resolvedType we 'know about' */
219,830
Bug 219830 java.lang.NullPointerException in Java15AnnotationFinder when using SWT
I receive the following Exception when running SWT with AspjectJ load time weaving through the Spring Framework. The lines around org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) are as follows: for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } When using the debugger, I see "world" as a null value. Attached is a stripped down Eclipse project that generates the error during startup. My runtime arguments are as follows: -javaagent:${resource_loc:/AspectJBug/lib/spring-agent.jar} -------------------------------------------- [AppClassLoader@19d819d8] abort trouble in: final class org.eclipse.swt.awt.SWT_AWT$10 extends java.lang.Object implements java.lang.Runnable: private final java.awt.Frame val$frame [Synthetic] void <init>(java.awt.Frame): ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 274) INVOKESPECIAL java.lang.Object.<init> ()V constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 1) | ALOAD_1 | PUTFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | RETURN constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) end void <init>(java.awt.Frame) public void run(): method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) | catch java.lang.Throwable -> E0 | | LDC "sun.awt.windows.WComponentPeer" (line 277) | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | ASTORE_1 | | ALOAD_1 // Ljava/lang/Class; clazz (line 278) | | LDC "winGraphicsConfig" | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | | INVOKEVIRTUAL java.lang.Class.getDeclaredField (Ljava/lang/String;)Ljava/lang/reflect/Field; | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | ASTORE_2 | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 279) | | ICONST_1 | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | | INVOKEVIRTUAL java.lang.reflect.Field.setAccessible (Z)V | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 280) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | | INVOKEVIRTUAL java.awt.Frame.getPeer ()Ljava/awt/peer/ComponentPeer; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | INVOKEVIRTUAL java.awt.Frame.getGraphicsConfiguration ()Ljava/awt/GraphicsConfiguration; | | INVOKEVIRTUAL java.lang.reflect.Field.set (Ljava/lang/Object;Ljava/lang/Object;)V | catch java.lang.Throwable -> E0 | GOTO L0 | E0: POP (line 281) | L0: RETURN (line 282) method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) end public void run() end final class org.eclipse.swt.awt.SWT_AWT$10 -- (NullPointerException) null null java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274) Feb 21, 2008 12:09:23 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: org/eclipse/swt/awt/SWT_AWT$10 java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274)
resolved fixed
1bbe6f9
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T23:54:38Z
2008-02-21T18:53:20Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java
public ResolvedType getGenericResolvedType() { ResolvedType rt = getResolvedTypeX(); if (rt.isParameterizedType() || rt.isRawType()) return rt.getGenericType(); return rt; } private ResolvedMember createGenericMethodMember(Method forMethod) { ReflectionBasedResolvedMemberImpl ret = new ReflectionBasedResolvedMemberImpl(org.aspectj.weaver.Member.METHOD, getGenericResolvedType(), forMethod.getModifiers(), typeConverter.fromType(forMethod.getReturnType()), forMethod.getName(), typeConverter.fromTypes(forMethod.getParameterTypes()), typeConverter.fromTypes(forMethod.getExceptionTypes()), forMethod ); ret.setAnnotationFinder(this.annotationFinder); ret.setGenericSignatureInformationProvider(new Java15GenericSignatureInformationProvider(this.getWorld())); return ret; } private ResolvedMember createGenericConstructorMember(Constructor forConstructor) { ReflectionBasedResolvedMemberImpl ret = new ReflectionBasedResolvedMemberImpl(org.aspectj.weaver.Member.METHOD, getGenericResolvedType(), forConstructor.getModifiers(), ResolvedType.VOID, "<init>", typeConverter.fromTypes(forConstructor.getParameterTypes()),
219,830
Bug 219830 java.lang.NullPointerException in Java15AnnotationFinder when using SWT
I receive the following Exception when running SWT with AspjectJ load time weaving through the Spring Framework. The lines around org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) are as follows: for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } When using the debugger, I see "world" as a null value. Attached is a stripped down Eclipse project that generates the error during startup. My runtime arguments are as follows: -javaagent:${resource_loc:/AspectJBug/lib/spring-agent.jar} -------------------------------------------- [AppClassLoader@19d819d8] abort trouble in: final class org.eclipse.swt.awt.SWT_AWT$10 extends java.lang.Object implements java.lang.Runnable: private final java.awt.Frame val$frame [Synthetic] void <init>(java.awt.Frame): ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 274) INVOKESPECIAL java.lang.Object.<init> ()V constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 1) | ALOAD_1 | PUTFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | RETURN constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) end void <init>(java.awt.Frame) public void run(): method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) | catch java.lang.Throwable -> E0 | | LDC "sun.awt.windows.WComponentPeer" (line 277) | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | ASTORE_1 | | ALOAD_1 // Ljava/lang/Class; clazz (line 278) | | LDC "winGraphicsConfig" | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | | INVOKEVIRTUAL java.lang.Class.getDeclaredField (Ljava/lang/String;)Ljava/lang/reflect/Field; | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | ASTORE_2 | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 279) | | ICONST_1 | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | | INVOKEVIRTUAL java.lang.reflect.Field.setAccessible (Z)V | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 280) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | | INVOKEVIRTUAL java.awt.Frame.getPeer ()Ljava/awt/peer/ComponentPeer; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | INVOKEVIRTUAL java.awt.Frame.getGraphicsConfiguration ()Ljava/awt/GraphicsConfiguration; | | INVOKEVIRTUAL java.lang.reflect.Field.set (Ljava/lang/Object;Ljava/lang/Object;)V | catch java.lang.Throwable -> E0 | GOTO L0 | E0: POP (line 281) | L0: RETURN (line 282) method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) end public void run() end final class org.eclipse.swt.awt.SWT_AWT$10 -- (NullPointerException) null null java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274) Feb 21, 2008 12:09:23 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: org/eclipse/swt/awt/SWT_AWT$10 java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274)
resolved fixed
1bbe6f9
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T23:54:38Z
2008-02-21T18:53:20Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java
typeConverter.fromTypes(forConstructor.getExceptionTypes()), forConstructor ); ret.setAnnotationFinder(this.annotationFinder); ret.setGenericSignatureInformationProvider(new Java15GenericSignatureInformationProvider(this.getWorld())); return ret; } private ResolvedMember createGenericFieldMember(Field forField) { ReflectionBasedResolvedMemberImpl ret = new ReflectionBasedResolvedMemberImpl( org.aspectj.weaver.Member.FIELD, getGenericResolvedType(), forField.getModifiers(), typeConverter.fromType(forField.getType()), forField.getName(), new UnresolvedType[0], forField); ret.setAnnotationFinder(this.annotationFinder); ret.setGenericSignatureInformationProvider(new Java15GenericSignatureInformationProvider(this.getWorld())); return ret; } public ResolvedMember[] getDeclaredPointcuts() { if (pointcuts == null) { Pointcut[] pcs = this.myType.getDeclaredPointcuts(); pointcuts = new ResolvedMember[pcs.length]; InternalUseOnlyPointcutParser parser = null; World world = getWorld(); if (world instanceof ReflectionWorld) { parser = new InternalUseOnlyPointcutParser(classLoader,(ReflectionWorld)getWorld());
219,830
Bug 219830 java.lang.NullPointerException in Java15AnnotationFinder when using SWT
I receive the following Exception when running SWT with AspjectJ load time weaving through the Spring Framework. The lines around org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) are as follows: for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } When using the debugger, I see "world" as a null value. Attached is a stripped down Eclipse project that generates the error during startup. My runtime arguments are as follows: -javaagent:${resource_loc:/AspectJBug/lib/spring-agent.jar} -------------------------------------------- [AppClassLoader@19d819d8] abort trouble in: final class org.eclipse.swt.awt.SWT_AWT$10 extends java.lang.Object implements java.lang.Runnable: private final java.awt.Frame val$frame [Synthetic] void <init>(java.awt.Frame): ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 274) INVOKESPECIAL java.lang.Object.<init> ()V constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 1) | ALOAD_1 | PUTFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | RETURN constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) end void <init>(java.awt.Frame) public void run(): method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) | catch java.lang.Throwable -> E0 | | LDC "sun.awt.windows.WComponentPeer" (line 277) | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | ASTORE_1 | | ALOAD_1 // Ljava/lang/Class; clazz (line 278) | | LDC "winGraphicsConfig" | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | | INVOKEVIRTUAL java.lang.Class.getDeclaredField (Ljava/lang/String;)Ljava/lang/reflect/Field; | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | ASTORE_2 | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 279) | | ICONST_1 | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | | INVOKEVIRTUAL java.lang.reflect.Field.setAccessible (Z)V | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 280) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | | INVOKEVIRTUAL java.awt.Frame.getPeer ()Ljava/awt/peer/ComponentPeer; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | INVOKEVIRTUAL java.awt.Frame.getGraphicsConfiguration ()Ljava/awt/GraphicsConfiguration; | | INVOKEVIRTUAL java.lang.reflect.Field.set (Ljava/lang/Object;Ljava/lang/Object;)V | catch java.lang.Throwable -> E0 | GOTO L0 | E0: POP (line 281) | L0: RETURN (line 282) method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) end public void run() end final class org.eclipse.swt.awt.SWT_AWT$10 -- (NullPointerException) null null java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274) Feb 21, 2008 12:09:23 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: org/eclipse/swt/awt/SWT_AWT$10 java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274)
resolved fixed
1bbe6f9
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T23:54:38Z
2008-02-21T18:53:20Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java
} else { parser = new InternalUseOnlyPointcutParser(classLoader); } for (int i = 0; i < pcs.length; i++) { AjType<?>[] ptypes = pcs[i].getParameterTypes(); UnresolvedType[] weaverPTypes = new UnresolvedType[ptypes.length]; for (int j = 0; j < weaverPTypes.length; j++) { weaverPTypes[j] = this.typeConverter.fromType(ptypes[j].getJavaClass()) ; } pointcuts[i] = new DeferredResolvedPointcutDefinition(getResolvedTypeX(),pcs[i].getModifiers(),pcs[i].getName(),weaverPTypes); } PointcutParameter[][] parameters = new PointcutParameter[pcs.length][]; for (int i = 0; i < pcs.length; i++) { AjType<?>[] ptypes = pcs[i].getParameterTypes(); String[] pnames = pcs[i].getParameterNames(); if (pnames.length != ptypes.length) { pnames = tryToDiscoverParameterNames(pcs[i]); if (pnames == null || (pnames.length != ptypes.length)) { throw new IllegalStateException("Required parameter names not available when parsing pointcut " + pcs[i].getName() + " in type " + getResolvedTypeX().getName()); } } parameters[i] = new PointcutParameter[ptypes.length]; for (int j = 0; j < parameters[i].length; j++) { parameters[i][j] = parser.createPointcutParameter(pnames[j],ptypes[j].getJavaClass()); } String pcExpr = pcs[i].getPointcutExpression().toString(); org.aspectj.weaver.patterns.Pointcut pc = parser.resolvePointcutExpression(pcExpr,getBaseClass(),parameters[i]);
219,830
Bug 219830 java.lang.NullPointerException in Java15AnnotationFinder when using SWT
I receive the following Exception when running SWT with AspjectJ load time weaving through the Spring Framework. The lines around org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) are as follows: for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } When using the debugger, I see "world" as a null value. Attached is a stripped down Eclipse project that generates the error during startup. My runtime arguments are as follows: -javaagent:${resource_loc:/AspectJBug/lib/spring-agent.jar} -------------------------------------------- [AppClassLoader@19d819d8] abort trouble in: final class org.eclipse.swt.awt.SWT_AWT$10 extends java.lang.Object implements java.lang.Runnable: private final java.awt.Frame val$frame [Synthetic] void <init>(java.awt.Frame): ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 274) INVOKESPECIAL java.lang.Object.<init> ()V constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 1) | ALOAD_1 | PUTFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | RETURN constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) end void <init>(java.awt.Frame) public void run(): method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) | catch java.lang.Throwable -> E0 | | LDC "sun.awt.windows.WComponentPeer" (line 277) | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | ASTORE_1 | | ALOAD_1 // Ljava/lang/Class; clazz (line 278) | | LDC "winGraphicsConfig" | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | | INVOKEVIRTUAL java.lang.Class.getDeclaredField (Ljava/lang/String;)Ljava/lang/reflect/Field; | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | ASTORE_2 | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 279) | | ICONST_1 | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | | INVOKEVIRTUAL java.lang.reflect.Field.setAccessible (Z)V | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 280) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | | INVOKEVIRTUAL java.awt.Frame.getPeer ()Ljava/awt/peer/ComponentPeer; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | INVOKEVIRTUAL java.awt.Frame.getGraphicsConfiguration ()Ljava/awt/GraphicsConfiguration; | | INVOKEVIRTUAL java.lang.reflect.Field.set (Ljava/lang/Object;Ljava/lang/Object;)V | catch java.lang.Throwable -> E0 | GOTO L0 | E0: POP (line 281) | L0: RETURN (line 282) method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) end public void run() end final class org.eclipse.swt.awt.SWT_AWT$10 -- (NullPointerException) null null java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274) Feb 21, 2008 12:09:23 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: org/eclipse/swt/awt/SWT_AWT$10 java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274)
resolved fixed
1bbe6f9
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T23:54:38Z
2008-02-21T18:53:20Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java
((ResolvedPointcutDefinition)pointcuts[i]).setParameterNames(pnames); ((ResolvedPointcutDefinition)pointcuts[i]).setPointcut(pc); } for (int i = 0; i < pointcuts.length; i++) { ResolvedPointcutDefinition rpd = (ResolvedPointcutDefinition) pointcuts[i]; rpd.setPointcut(parser.concretizePointcutExpression(rpd.getPointcut(), getBaseClass(), parameters[i])); } } return pointcuts; } private String[] tryToDiscoverParameterNames(Pointcut pcut) { Method[] ms = pcut.getDeclaringType().getJavaClass().getDeclaredMethods(); for(Method m : ms) { if (m.getName().equals(pcut.getName())) { return argNameFinder.getParameterNames(m); } } return null; } public boolean isAnnotation() { return getBaseClass().isAnnotation(); } public boolean isAnnotationStyleAspect() { return getBaseClass().isAnnotationPresent(Aspect.class); }
219,830
Bug 219830 java.lang.NullPointerException in Java15AnnotationFinder when using SWT
I receive the following Exception when running SWT with AspjectJ load time weaving through the Spring Framework. The lines around org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) are as follows: for (int i = 0; i < anns.length; i++) { annSet.add(world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature()))); } When using the debugger, I see "world" as a null value. Attached is a stripped down Eclipse project that generates the error during startup. My runtime arguments are as follows: -javaagent:${resource_loc:/AspectJBug/lib/spring-agent.jar} -------------------------------------------- [AppClassLoader@19d819d8] abort trouble in: final class org.eclipse.swt.awt.SWT_AWT$10 extends java.lang.Object implements java.lang.Runnable: private final java.awt.Frame val$frame [Synthetic] void <init>(java.awt.Frame): ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 274) INVOKESPECIAL java.lang.Object.<init> ()V constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this (line 1) | ALOAD_1 | PUTFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | RETURN constructor-execution(void org.eclipse.swt.awt.SWT_AWT$10.<init>(java.awt.Frame)) end void <init>(java.awt.Frame) public void run(): method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) | catch java.lang.Throwable -> E0 | | LDC "sun.awt.windows.WComponentPeer" (line 277) | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class java.lang.Class.forName(java.lang.String)) | | ASTORE_1 | | ALOAD_1 // Ljava/lang/Class; clazz (line 278) | | LDC "winGraphicsConfig" | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | | INVOKEVIRTUAL java.lang.Class.getDeclaredField (Ljava/lang/String;)Ljava/lang/reflect/Field; | | method-call(java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)) | | ASTORE_2 | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 279) | | ICONST_1 | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | | INVOKEVIRTUAL java.lang.reflect.Field.setAccessible (Z)V | | method-call(void java.lang.reflect.Field.setAccessible(boolean)) | | ALOAD_2 // Ljava/lang/reflect/Field; field (line 280) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | | INVOKEVIRTUAL java.awt.Frame.getPeer ()Ljava/awt/peer/ComponentPeer; | | method-call(java.awt.peer.ComponentPeer java.awt.Frame.getPeer()) | | ALOAD_0 // Lorg/eclipse/swt/awt/SWT_AWT$10; this | | GETFIELD org.eclipse.swt.awt.SWT_AWT$10.val$frame Ljava/awt/Frame; | | INVOKEVIRTUAL java.awt.Frame.getGraphicsConfiguration ()Ljava/awt/GraphicsConfiguration; | | INVOKEVIRTUAL java.lang.reflect.Field.set (Ljava/lang/Object;Ljava/lang/Object;)V | catch java.lang.Throwable -> E0 | GOTO L0 | E0: POP (line 281) | L0: RETURN (line 282) method-execution(void org.eclipse.swt.awt.SWT_AWT$10.run()) end public void run() end final class org.eclipse.swt.awt.SWT_AWT$10 -- (NullPointerException) null null java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274) Feb 21, 2008 12:09:23 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: org/eclipse/swt/awt/SWT_AWT$10 java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:123) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174) at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82) at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:52) at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146) at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:75) at org.aspectj.weaver.Advice.match(Advice.java:112) at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:118) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2811) at org.aspectj.weaver.bcel.BcelClassWeaver.matchInvokeInstruction(BcelClassWeaver.java:2773) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2506) at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2332) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:494) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1651) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1602) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1380) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1200) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:360) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:262) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52) at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformerDecorator.transform(AspectJWeavingEnabler.java:84) at sun.instrument.TransformerManager.transform(TransformerManager.java:141) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:174) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:228) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at java.net.URLClassLoader.defineClass(URLClassLoader.java:557) at java.net.URLClassLoader.access$400(URLClassLoader.java:120) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962) at java.security.AccessController.doPrivileged(AccessController.java:275) at java.net.URLClassLoader.findClass(URLClassLoader.java:488) at java.lang.ClassLoader.loadClass(ClassLoader.java:607) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:274)
resolved fixed
1bbe6f9
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-26T23:54:38Z
2008-02-21T18:53:20Z
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java
public boolean isAnnotationWithRuntimeRetention() { if (!isAnnotation()) return false; if (getBaseClass().isAnnotationPresent(Retention.class)) { Retention retention = (Retention) getBaseClass().getAnnotation(Retention.class); RetentionPolicy policy = retention.value(); return policy == RetentionPolicy.RUNTIME; } else { return false; } } public boolean isAspect() { return this.myType.isAspect(); } public boolean isEnum() { return getBaseClass().isEnum(); } public boolean isGeneric() { return getBaseClass().getTypeParameters().length > 0; } @Override public boolean isAnonymous() { return this.myClass.isAnonymousClass(); } }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
/* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). * 2005 Contributors * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * PARC initial implementation * Adrian Colyer, Andy Clement, overhaul for generics * ******************************************************************/
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
package org.aspectj.weaver; import java.lang.ref.ReferenceQueue; import java.lang.ref.SoftReference; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.WeakHashMap; import org.aspectj.asm.IHierarchy; import org.aspectj.bridge.IMessageHandler; import org.aspectj.bridge.ISourceLocation; import org.aspectj.bridge.Message; import org.aspectj.bridge.MessageUtil; import org.aspectj.bridge.IMessage.Kind; import org.aspectj.bridge.context.PinpointingMessageHandler; import org.aspectj.weaver.UnresolvedType.TypeKind; import org.aspectj.weaver.bcel.BcelObjectType; import org.aspectj.weaver.patterns.DeclarePrecedence; import org.aspectj.weaver.patterns.PerClause; import org.aspectj.weaver.patterns.Pointcut; import org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegate; import org.aspectj.weaver.tools.Trace; import org.aspectj.weaver.tools.TraceFactory; /** * A World is a collection of known types and crosscutting members. */ public abstract class World implements Dump.INode {
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
private IMessageHandler messageHandler = IMessageHandler.SYSTEM_ERR; private ICrossReferenceHandler xrefHandler = null; private TypeVariableDeclaringElement typeVariableLookupScope; protected TypeMap typeMap = new TypeMap(this); public static boolean createInjarHierarchy = true; private AspectPrecedenceCalculator precedenceCalculator; private CrosscuttingMembersSet crosscuttingMembersSet = new CrosscuttingMembersSet(this); private IHierarchy model = null; private Lint lint = new Lint(this);
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
private boolean XnoInline; private boolean XlazyTjp; private boolean XhasMember = false; private boolean Xpinpoint = false; private boolean behaveInJava5Way = false; private boolean incrementalCompileCouldFollow = false; private String targetAspectjRuntimeLevel = Constants.RUNTIME_LEVEL_DEFAULT; private boolean optionalJoinpoint_ArrayConstruction = false; private boolean optionalJoinpoint_Synchronization = false; private boolean addSerialVerUID = false; private Properties extraConfiguration = null; private boolean checkedAdvancedConfiguration=false;
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
private boolean synchronizationPointcutsInUse = false; private boolean fastDelegateSupportEnabled = isASMAround; private boolean runMinimalMemory = false; private boolean shouldPipelineCompilation = true; protected boolean bcelRepositoryCaching = xsetBCEL_REPOSITORY_CACHING_DEFAULT.equalsIgnoreCase("true"); private boolean completeBinaryTypes = false; public boolean forDEBUG_structuralChangesCode = false; public boolean forDEBUG_bridgingCode = false; private static Trace trace = TraceFactory.getTraceFactory().getTrace(World.class); protected static boolean isASMAround = false; private long errorThreshold; private long warningThreshold; /** * A list of RuntimeExceptions containing full stack information for every * type we couldn't find. */ private List dumpState_cantFindTypeExceptions = null; /** * Play God. * On the first day, God created the primitive types and put them in the type * map.