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
unknown
report_datetime
unknown
updated_file
stringlengths
23
187
chunk_content
stringlengths
1
22k
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
/** * The aim of this method is to make sure a particular type is 'ok'. Some operations on the delegate for a type modify it and * this method is intended to undo that... see pr85132 */ @Override public void validateType(UnresolvedType type) { ResolvedType result = typeMap.get(type.getSignature()); if (result == null) { return; } if (!result.isExposedToWeaver()) { return; } result.ensureConsistent(); } /** * Apply a single declare parents - return true if we change the type */ private boolean applyDeclareParents(DeclareParents p, ResolvedType onType) { boolean didSomething = false;
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
List<ResolvedType> newParents = p.findMatchingNewParents(onType, true); if (!newParents.isEmpty()) { didSomething = true; BcelObjectType classType = BcelWorld.getBcelObjectType(onType); for (ResolvedType newParent : newParents) { onType.addParent(newParent); ResolvedTypeMunger newParentMunger = new NewParentTypeMunger(newParent, p.getDeclaringType()); newParentMunger.setSourceLocation(p.getSourceLocation()); onType.addInterTypeMunger(new BcelTypeMunger(newParentMunger, getCrosscuttingMembersSet() .findAspectDeclaringParents(p)), false); } } return didSomething; } /** * Apply a declare @type - return true if we change the type */ private boolean applyDeclareAtType(DeclareAnnotation decA, ResolvedType onType, boolean reportProblems) { boolean didSomething = false; if (decA.matches(onType)) { if (onType.hasAnnotation(decA.getAnnotation().getType())) { return false; }
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
AnnotationAJ annoX = decA.getAnnotation(); boolean isOK = checkTargetOK(decA, onType, annoX); if (isOK) { didSomething = true; ResolvedTypeMunger newAnnotationTM = new AnnotationOnTypeMunger(annoX); newAnnotationTM.setSourceLocation(decA.getSourceLocation()); onType.addInterTypeMunger(new BcelTypeMunger(newAnnotationTM, decA.getAspect().resolve(this)), false); decA.copyAnnotationTo(onType); } } return didSomething; } /** * Apply the specified declare @field construct to any matching fields in the specified type. * @param deca the declare annotation targeting fields * @param type the type to check for members matching the declare annotation * @return true if something matched and the type was modified */ private boolean applyDeclareAtField(DeclareAnnotation deca, ResolvedType type) { boolean changedType = false; ResolvedMember[] fields = type.getDeclaredFields(); for (ResolvedMember field: fields) { if (deca.matches(field, this)) { AnnotationAJ anno = deca.getAnnotation(); if (!field.hasAnnotation(anno.getType())) { field.addAnnotation(anno); changedType=true; }
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
} } return changedType; } /** * Checks for an @target() on the annotation and if found ensures it allows the annotation to be attached to the target type * that matched. */ private boolean checkTargetOK(DeclareAnnotation decA, ResolvedType onType, AnnotationAJ annoX) { if (annoX.specifiesTarget()) { if ((onType.isAnnotation() && !annoX.allowedOnAnnotationType()) || (!annoX.allowedOnRegularType())) { return false; } } return true; } protected void weaveInterTypeDeclarations(ResolvedType onType) { List<DeclareParents> declareParentsList = getCrosscuttingMembersSet().getDeclareParents(); if (onType.isRawType()) { onType = onType.getGenericType(); } onType.clearInterTypeMungers(); List<DeclareParents> decpToRepeat = new ArrayList<DeclareParents>(); boolean aParentChangeOccurred = false; boolean anAnnotationChangeOccurred = false;
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
for (Iterator<DeclareParents> i = declareParentsList.iterator(); i.hasNext();) { DeclareParents decp = i.next(); boolean typeChanged = applyDeclareParents(decp, onType); if (typeChanged) { aParentChangeOccurred = true; } else { if (!decp.getChild().isStarAnnotation()) { decpToRepeat.add(decp); } } } for (DeclareAnnotation decA : getCrosscuttingMembersSet().getDeclareAnnotationOnTypes()) { boolean typeChanged = applyDeclareAtType(decA, onType, true); if (typeChanged) { anAnnotationChangeOccurred = true; } } for (DeclareAnnotation deca: getCrosscuttingMembersSet().getDeclareAnnotationOnFields()) { if (applyDeclareAtField(deca,onType)) { anAnnotationChangeOccurred = true; } } while ((aParentChangeOccurred || anAnnotationChangeOccurred) && !decpToRepeat.isEmpty()) { anAnnotationChangeOccurred = aParentChangeOccurred = false; List<DeclareParents> decpToRepeatNextTime = new ArrayList<DeclareParents>();
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
for (DeclareParents decp: decpToRepeat) { if (applyDeclareParents(decp, onType)) { aParentChangeOccurred = true; } else { decpToRepeatNextTime.add(decp); } } for (DeclareAnnotation deca: getCrosscuttingMembersSet().getDeclareAnnotationOnTypes()) { if (applyDeclareAtType(deca, onType, false)) { anAnnotationChangeOccurred = true; } } for (DeclareAnnotation deca: getCrosscuttingMembersSet().getDeclareAnnotationOnFields()) { if (applyDeclareAtField(deca, onType)) { anAnnotationChangeOccurred = true; } } decpToRepeat = decpToRepeatNextTime; } } @Override public IWeavingSupport getWeavingSupport() { return bcelWeavingSupport; } @Override public void reportCheckerMatch(Checker checker, Shadow shadow) { IMessage iMessage = new Message(checker.getMessage(shadow), shadow.toString(), checker.isError() ? IMessage.ERROR : IMessage.WARNING, shadow.getSourceLocation(), null, new ISourceLocation[] { checker.getSourceLocation() }, true,
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
0, -1, -1); getMessageHandler().handleMessage(iMessage); if (getCrossReferenceHandler() != null) { getCrossReferenceHandler() .addCrossReference( checker.getSourceLocation(), shadow.getSourceLocation(), (checker.isError() ? IRelationship.Kind.DECLARE_ERROR.getName() : IRelationship.Kind.DECLARE_WARNING .getName()), false); } if (getModel() != null) { AsmRelationshipProvider.addDeclareErrorOrWarningRelationship(getModelAsAsmManager(), shadow, checker); } } public AsmManager getModelAsAsmManager() { return (AsmManager) getModel(); } void raiseError(String message) { getMessageHandler().handleMessage(MessageUtil.error(message)); } /** * These are aop.xml files that can be used to alter the aspects that actually apply from those passed in - and also their scope * of application to other files in the system. * * @param xmlFiles list of File objects representing any aop.xml files passed in to configure the build process */ public void setXmlFiles(List<File> xmlFiles) { if (!isXmlConfiguredWorld && !xmlFiles.isEmpty()) { raiseError("xml configuration files only supported by the compiler when -xmlConfigured option specified"); return;
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
} if (!xmlFiles.isEmpty()) { xmlConfiguration = new WeavingXmlConfig(this, WeavingXmlConfig.MODE_COMPILE); } for (File xmlfile : xmlFiles) { try { Definition d = DocumentParser.parse(xmlfile.toURI().toURL()); xmlConfiguration.add(d); } catch (MalformedURLException e) { raiseError("Unexpected problem processing XML config file '" + xmlfile.getName() + "' :" + e.getMessage()); } catch (Exception e) { raiseError("Unexpected problem processing XML config file '" + xmlfile.getName() + "' :" + e.getMessage()); } } } /** * Add a scoped aspects where the scoping was defined in an aop.xml file and this world is being used in a LTW configuration */ public void addScopedAspect(String name, String scope) { this.isXmlConfiguredWorld = true; if (xmlConfiguration == null) { xmlConfiguration = new WeavingXmlConfig(this, WeavingXmlConfig.MODE_LTW); } xmlConfiguration.addScopedAspect(name, scope); } public void setXmlConfigured(boolean b) { this.isXmlConfiguredWorld = b; } @Override public boolean isXmlConfigured() {
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
return isXmlConfiguredWorld && xmlConfiguration != null; } public WeavingXmlConfig getXmlConfiguration() { return xmlConfiguration; } @Override public boolean isAspectIncluded(ResolvedType aspectType) { if (!isXmlConfigured()) { return true; } return xmlConfiguration.specifiesInclusionOfAspect(aspectType.getName()); } @Override public TypePattern getAspectScope(ResolvedType declaringType) { return xmlConfiguration.getScopeFor(declaringType.getName()); } @Override public boolean hasUnsatisfiedDependency(ResolvedType aspectType) { if (!aspectRequiredTypesProcessed) { if (aspectRequiredTypes != null) { List<String> forRemoval = new ArrayList<String>(); for (Map.Entry<String, String> entry : aspectRequiredTypes.entrySet()) { ResolvedType rt = this.resolve(UnresolvedType.forName(entry.getValue())); if (!rt.isMissing()) { forRemoval.add(entry.getKey()); } else { if (!getMessageHandler().isIgnoring(IMessage.INFO)) { getMessageHandler().handleMessage( MessageUtil.info("deactivating aspect '" + aspectType.getName() + "' as it requires type '" + rt.getName() + "' which cannot be found on the classpath"));
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
} } } for (String key : forRemoval) { aspectRequiredTypes.remove(key); } } aspectRequiredTypesProcessed = true; } if (aspectRequiredTypes == null) { return false; } return aspectRequiredTypes.containsKey(aspectType.getName()); } private boolean aspectRequiredTypesProcessed = false; private Map<String, String> aspectRequiredTypes = null; public void addAspectRequires(String name, String requiredType) { if (aspectRequiredTypes == null) { aspectRequiredTypes = new HashMap<String, String>(); } aspectRequiredTypes.put(name, requiredType); } /** * A WeavingXmlConfig is initially a collection of definitions from XML files - once the world is ready and weaving is running * it will initialize and transform those definitions into an optimized set of values (eg. resolve type patterns and string * names to real entities). It can then answer questions quickly: (1) is this aspect included in the weaving? (2) Is there a * scope specified for this aspect and does it include type X? * */ static class WeavingXmlConfig {
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
final static int MODE_COMPILE = 1; final static int MODE_LTW = 2; private int mode; private boolean initialized = false; private List<Definition> definitions = new ArrayList<Definition>(); private List<String> resolvedIncludedAspects = new ArrayList<String>(); private Map<String, TypePattern> scopes = new HashMap<String, TypePattern>(); private List<String> includedFastMatchPatterns = Collections.emptyList(); private List<TypePattern> includedPatterns = Collections.emptyList(); private List<String> excludedFastMatchPatterns = Collections.emptyList(); private List<TypePattern> excludedPatterns = Collections.emptyList(); private BcelWorld world; public WeavingXmlConfig(BcelWorld bcelWorld, int mode) { this.world = bcelWorld; this.mode = mode; } public void add(Definition d) { definitions.add(d); } public void addScopedAspect(String aspectName, String scope) { ensureInitialized(); resolvedIncludedAspects.add(aspectName);
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
try { TypePattern scopePattern = new PatternParser(scope).parseTypePattern(); scopePattern.resolve(world); scopes.put(aspectName, scopePattern); if (!world.getMessageHandler().isIgnoring(IMessage.INFO)) { world.getMessageHandler().handleMessage( MessageUtil.info("Aspect '" + aspectName + "' is scoped to apply against types matching pattern '" + scopePattern.toString() + "'")); } } catch (Exception e) { world.getMessageHandler().handleMessage( MessageUtil.error("Unable to parse scope as type pattern. Scope was '" + scope + "': " + e.getMessage())); } } public void ensureInitialized() { if (!initialized) { try { resolvedIncludedAspects = new ArrayList<String>(); for (Definition definition : definitions) { List<String> aspectNames = definition.getAspectClassNames(); for (String name : aspectNames) { resolvedIncludedAspects.add(name);
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
String scope = definition.getScopeForAspect(name); if (scope != null) { try { TypePattern scopePattern = new PatternParser(scope).parseTypePattern(); scopePattern.resolve(world); scopes.put(name, scopePattern); if (!world.getMessageHandler().isIgnoring(IMessage.INFO)) { world.getMessageHandler().handleMessage( MessageUtil.info("Aspect '" + name + "' is scoped to apply against types matching pattern '" + scopePattern.toString() + "'")); } } catch (Exception e) { world.getMessageHandler().handleMessage( MessageUtil.error("Unable to parse scope as type pattern. Scope was '" + scope + "': " + e.getMessage())); } } } try { List<String> includePatterns = definition.getIncludePatterns(); if (includePatterns.size() > 0) { includedPatterns = new ArrayList<TypePattern>(); includedFastMatchPatterns = new ArrayList<String>(); } for (String includePattern : includePatterns) { if (includePattern.endsWith("..*")) {
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
includedFastMatchPatterns.add(includePattern.substring(0, includePattern.length() - 2)); } else { TypePattern includedPattern = new PatternParser(includePattern).parseTypePattern(); includedPatterns.add(includedPattern); } } List<String> excludePatterns = definition.getExcludePatterns(); if (excludePatterns.size() > 0) { excludedPatterns = new ArrayList<TypePattern>(); excludedFastMatchPatterns = new ArrayList<String>(); } for (String excludePattern : excludePatterns) { if (excludePattern.endsWith("..*")) { excludedFastMatchPatterns.add(excludePattern.substring(0, excludePattern.length() - 2)); } else { TypePattern excludedPattern = new PatternParser(excludePattern).parseTypePattern(); excludedPatterns.add(excludedPattern); } } } catch (ParserException pe) { world.getMessageHandler().handleMessage( MessageUtil.error("Unable to parse type pattern: " + pe.getMessage())); } } } finally { initialized = true; } }
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
} public boolean specifiesInclusionOfAspect(String name) { ensureInitialized(); return resolvedIncludedAspects.contains(name); } public TypePattern getScopeFor(String name) { return scopes.get(name); } public boolean excludesType(ResolvedType type) { if (mode == MODE_LTW) { return false; } String typename = type.getName(); boolean excluded = false; for (String excludedPattern : excludedFastMatchPatterns) { if (typename.startsWith(excludedPattern)) { excluded = true; break; } } if (!excluded) { for (TypePattern excludedPattern : excludedPatterns) { if (excludedPattern.matchesStatically(type)) { excluded = true;
398,588
Bug 398588 Using aspect 'requires' clause causes all aspects with 'requires' clauses not be loaded regardless
The usage of the 'requires' clause causes all aspects that have have 'requires' clauses not to be loaded regardless of whether the specified required class exists or not. Here is the scenario and why it happens: Let's assume we have a bunch of aspects (A1, A2, A3, etc.) - all with 'requires' clauses and all referencing classes that can be satisfied. ClassLoaderWeavingAdaptor#registerAspects goes over the aspects in a Definition one by one. It reaches aspect A1 and detects that it has a 'requires' clause, and so it invokes BcelWorld#addAspectRequires. This causes the aspect A1 and its required class to be registered in an internal 'aspectRequiredTypes' map. Then the code calls BcelWeaver#addLibraryAspect with A1 as the argument, which in turn calls addOrReplaceAspect which invokes 'hasUnsatisfiedDependency'. The 'hasUnsatisfiedDependency' has been written to run only ONCE - i.e., it checks if it has already run, and if so then it does nothing. Otherwise, it removes from the 'aspectRequiredTypes' map all the types that can be resolved, thus leaving only those that cannot be resolved. In other words, it assumes that after having run (once !!!) any remaining type must be unsatified. Thus, when it is invoked with A1, being the 1st time, it resolves the required type by A1 and leaves the 'aspectRequiredTypes' map empty - but also marks that no further running is required. When the ClassLoaderWeavingAdaptor#registerAspects loop reaches A2, it call BcelWorld#addAspectRequires since A2 also declares a 'requires' clause. This causes A2 and its referenced class to be mapped in the 'aspectRequiredTypes' map. However, when BcelWeaver#addLibraryAspect is called with A2 and the code reaches 'hasUnsatisfiedDependency' - the code assumes that it has already run (which it has - with A1), so it does not check if indeed A2's referenced class can be satisfied (which we assume it can). In other words, all subsequent aspects (A2, A3, etc.) are declared as having unsatisified dependencies - which they don't. The (quick) bugfix seems rather simple: every time BcelWorld#addAspectRequires method is called, it should mark 'aspectRequiredTypesProcessed' as FALSE, in order to force a re-evaluation in case 'hasUnsatisfiedDependency' is called.
resolved fixed
96ebaae
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-21T18:46:15Z"
"2013-01-20T05:33:20Z"
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
break; } } } return excluded; } } public TypeMap getTypeMap() { return typeMap; } public boolean isLoadtimeWeaving() { return false; } public void addTypeDelegateResolver(TypeDelegateResolver typeDelegateResolver) { if (typeDelegateResolvers == null) { typeDelegateResolvers = new ArrayList<TypeDelegateResolver>(); } typeDelegateResolvers.add(typeDelegateResolver); } public void classWriteEvent(char[][] compoundName) { typeMap.classWriteEvent(new String(CharOperation.concatWith(compoundName, '.'))); } /** * Force demote a type. */ public void demote(ResolvedType type) { typeMap.demote(type); } }
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
/* ******************************************************************* * Copyright (c) 2002,2010 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 * Alexandre Vasseur support for @AJ perClause * ******************************************************************/ package org.aspectj.ajdt.internal.compiler.lookup; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import org.aspectj.ajdt.internal.compiler.ast.AdviceDeclaration; import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration; import org.aspectj.ajdt.internal.compiler.ast.DeclareAnnotationDeclaration; import org.aspectj.ajdt.internal.compiler.ast.DeclareDeclaration; import org.aspectj.ajdt.internal.compiler.ast.InterTypeDeclaration; import org.aspectj.ajdt.internal.compiler.ast.PointcutDeclaration; import org.aspectj.ajdt.internal.core.builder.EclipseSourceContext;
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
import org.aspectj.bridge.IMessage; import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Argument; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ArrayInitializer; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Literal; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.MarkerAnnotation; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.MemberValuePair; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.NameReference; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.NormalAnnotation; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.SingleMemberAnnotation; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.SingleNameReference; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.StringLiteral; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeParameter; import org.aspectj.org.eclipse.jdt.internal.compiler.impl.Constant; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ArrayBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.FieldBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SyntheticMethodBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TagBits; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding; import org.aspectj.weaver.AbstractReferenceTypeDelegate; import org.aspectj.weaver.AnnotationAJ; import org.aspectj.weaver.AnnotationAnnotationValue; import org.aspectj.weaver.AnnotationNameValuePair; import org.aspectj.weaver.AnnotationTargetKind; import org.aspectj.weaver.AnnotationValue; import org.aspectj.weaver.ArrayAnnotationValue; import org.aspectj.weaver.BCException; import org.aspectj.weaver.EnumAnnotationValue; import org.aspectj.weaver.ReferenceType; import org.aspectj.weaver.ResolvedMember; import org.aspectj.weaver.ResolvedMemberImpl; import org.aspectj.weaver.ResolvedPointcutDefinition; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.StandardAnnotation; import org.aspectj.weaver.TypeVariable; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.WeaverStateInfo; import org.aspectj.weaver.World; import org.aspectj.weaver.bcel.AtAjAttributes.LazyResolvedPointcutDefinition; import org.aspectj.weaver.patterns.Declare; import org.aspectj.weaver.patterns.FormalBinding; import org.aspectj.weaver.patterns.ParserException; import org.aspectj.weaver.patterns.PatternParser; import org.aspectj.weaver.patterns.PerClause; import org.aspectj.weaver.patterns.PerFromSuper; import org.aspectj.weaver.patterns.PerSingleton;
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
import org.aspectj.weaver.patterns.Pointcut; /** * Supports viewing eclipse TypeDeclarations/SourceTypeBindings as a ResolvedType * * @author Jim Hugunin * @author Andy Clement */ public class EclipseSourceType extends AbstractReferenceTypeDelegate { private static final char[] pointcutSig = "Lorg/aspectj/lang/annotation/Pointcut;".toCharArray(); private static final char[] aspectSig = "Lorg/aspectj/lang/annotation/Aspect;".toCharArray(); protected ResolvedPointcutDefinition[] declaredPointcuts = null; protected ResolvedMember[] declaredMethods = null; protected ResolvedMember[] declaredFields = null; public List<Declare> declares = new ArrayList<Declare>(); public List<EclipseTypeMunger> typeMungers = new ArrayList<EclipseTypeMunger>(); private final EclipseFactory factory; private final SourceTypeBinding binding; private final TypeDeclaration declaration; private final CompilationUnitDeclaration unit; private boolean annotationsFullyResolved = false; private boolean annotationTypesAreResolved = false; private ResolvedType[] annotationTypes = null; private boolean discoveredAnnotationTargetKinds = false; private AnnotationTargetKind[] annotationTargetKinds; private AnnotationAJ[] annotations = null; protected EclipseFactory eclipseWorld() { return factory; } public EclipseSourceType(ReferenceType resolvedTypeX, EclipseFactory factory, SourceTypeBinding binding, TypeDeclaration declaration, CompilationUnitDeclaration unit) {
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
super(resolvedTypeX, true); this.factory = factory; this.binding = binding; this.declaration = declaration; this.unit = unit; setSourceContext(new EclipseSourceContext(declaration.compilationResult)); resolvedTypeX.setStartPos(declaration.sourceStart); resolvedTypeX.setEndPos(declaration.sourceEnd); } public boolean isAspect() { final boolean isCodeStyle = declaration instanceof AspectDeclaration; return isCodeStyle ? isCodeStyle : isAnnotationStyleAspect(); } public boolean isAnonymous() { if (declaration.binding != null) { return declaration.binding.isAnonymousType(); } return ((declaration.modifiers & (ASTNode.IsAnonymousType | ASTNode.IsLocalType)) != 0); } public boolean isNested() { if (declaration.binding != null) { return (declaration.binding.isMemberType()); } return ((declaration.modifiers & ASTNode.IsMemberType) != 0); } public ResolvedType getOuterClass() { if (declaration.enclosingType == null) { return null; } return eclipseWorld().fromEclipse(declaration.enclosingType.binding);
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} public boolean isAnnotationStyleAspect() { if (declaration.annotations == null) { return false; } ResolvedType[] annotations = getAnnotationTypes(); for (int i = 0; i < annotations.length; i++) { if ("org.aspectj.lang.annotation.Aspect".equals(annotations[i].getName())) { return true; } } return false; } private String getPointcutStringFromAnnotationStylePointcut(AbstractMethodDeclaration amd) { Annotation[] ans = amd.annotations; if (ans == null) { return ""; } for (int i = 0; i < ans.length; i++) { if (ans[i].resolvedType == null) { continue; } char[] sig = ans[i].resolvedType.signature(); if (CharOperation.equals(pointcutSig, sig)) { if (ans[i].memberValuePairs().length == 0) { return "";
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} Expression expr = ans[i].memberValuePairs()[0].value; if (expr instanceof StringLiteral) { StringLiteral sLit = ((StringLiteral) expr); return new String(sLit.source()); } else if (expr instanceof NameReference && (((NameReference) expr).binding instanceof FieldBinding)) { Binding b = ((NameReference) expr).binding; Constant c = ((FieldBinding) b).constant; return c.stringValue(); } else { throw new BCException("Do not know how to recover pointcut definition from " + expr + " (type " + expr.getClass().getName() + ")"); } } } return ""; } private boolean isAnnotationStylePointcut(Annotation[] annotations) { if (annotations == null) { return false; } for (int i = 0; i < annotations.length; i++) { if (annotations[i].resolvedType == null) { continue; } char[] sig = annotations[i].resolvedType.signature(); if (CharOperation.equals(pointcutSig, sig)) {
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
return true; } } return false; } public WeaverStateInfo getWeaverState() { return null; } public ResolvedType getSuperclass() { if (binding.isInterface()) { return getResolvedTypeX().getWorld().getCoreType(UnresolvedType.OBJECT); } return eclipseWorld().fromEclipse(binding.superclass()); } public ResolvedType[] getDeclaredInterfaces() { return eclipseWorld().fromEclipse(binding.superInterfaces()); } protected void fillDeclaredMembers() { List<ResolvedMember> declaredPointcuts = new ArrayList<ResolvedMember>(); List<ResolvedMember> declaredMethods = new ArrayList<ResolvedMember>(); List<ResolvedMember> declaredFields = new ArrayList<ResolvedMember>(); MethodBinding[] ms = binding.methods(); AbstractMethodDeclaration[] methods = declaration.methods; if (methods != null) { for (int i = 0, len = methods.length; i < len; i++) { AbstractMethodDeclaration amd = methods[i]; if (amd == null || amd.ignoreFurtherInvestigation) { continue;
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} if (amd instanceof PointcutDeclaration) { PointcutDeclaration d = (PointcutDeclaration) amd; ResolvedPointcutDefinition df = d.makeResolvedPointcutDefinition(factory); if (df != null) { declaredPointcuts.add(df); } } else if (amd instanceof InterTypeDeclaration) { continue; } else if (amd instanceof DeclareDeclaration && !(amd instanceof DeclareAnnotationDeclaration)) { continue; } else if (amd instanceof AdviceDeclaration) { continue; } else if ((amd.annotations != null) && isAnnotationStylePointcut(amd.annotations)) { ResolvedPointcutDefinition df = makeResolvedPointcutDefinition(amd); if (df != null) { declaredPointcuts.add(df); } } else { if (amd.binding == null || !amd.binding.isValidBinding()) { continue; }
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
ResolvedMember member = factory.makeResolvedMember(amd.binding); if (unit != null) { boolean positionKnown = true; if (amd.binding.sourceMethod() == null) { if (amd.binding.declaringClass instanceof SourceTypeBinding) { SourceTypeBinding stb = ((SourceTypeBinding) amd.binding.declaringClass); if (stb.scope == null || stb.scope.referenceContext == null) { positionKnown = false; } } } if (positionKnown) { member.setSourceContext(new EclipseSourceContext(unit.compilationResult, amd.binding.sourceStart())); member.setPosition(amd.binding.sourceStart(), amd.binding.sourceEnd()); } else { member.setSourceContext(new EclipseSourceContext(unit.compilationResult, 0)); member.setPosition(0, 0); } } declaredMethods.add(member); } } } if (isEnum()) { for (int m=0,len=ms.length;m<len;m++) { MethodBinding mb = ms[m]; if ((mb instanceof SyntheticMethodBinding) && mb.isStatic()) { if (CharOperation.equals(mb.selector,valuesCharArray) && mb.parameters.length==0 && mb.returnType.isArrayType() && ((ArrayBinding)mb.returnType).leafComponentType()==binding) {
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
ResolvedMember valuesMember = factory.makeResolvedMember(mb); valuesMember.setSourceContext(new EclipseSourceContext(unit.compilationResult, 0)); valuesMember.setPosition(0, 0); declaredMethods.add(valuesMember); } else if (CharOperation.equals(mb.selector,valueOfCharArray) && mb.parameters.length==1 && CharOperation.equals(mb.parameters[0].signature(),jlString) && mb.returnType==binding) { ResolvedMember valueOfMember = factory.makeResolvedMember(mb); valueOfMember.setSourceContext(new EclipseSourceContext(unit.compilationResult, 0)); valueOfMember.setPosition(0, 0); declaredMethods.add(valueOfMember); } } } } FieldBinding[] fields = binding.fields(); for (int i = 0, len = fields.length; i < len; i++) { FieldBinding f = fields[i]; declaredFields.add(factory.makeResolvedMember(f)); } this.declaredPointcuts = declaredPointcuts.toArray(new ResolvedPointcutDefinition[declaredPointcuts.size()]); this.declaredMethods = declaredMethods.toArray(new ResolvedMember[declaredMethods.size()]); this.declaredFields = declaredFields.toArray(new ResolvedMember[declaredFields.size()]); } private final static char[] valuesCharArray = "values".toCharArray(); private final static char[] valueOfCharArray = "valueOf".toCharArray(); private final static char[] jlString = "Ljava/lang/String;".toCharArray(); private ResolvedPointcutDefinition makeResolvedPointcutDefinition(AbstractMethodDeclaration md) {
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
if (md.binding == null) { return null; } EclipseSourceContext eSourceContext = new EclipseSourceContext(md.compilationResult); Pointcut pc = null; if (!md.isAbstract()) { String expression = getPointcutStringFromAnnotationStylePointcut(md); try { pc = new PatternParser(expression, eSourceContext).parsePointcut(); } catch (ParserException pe) { pc = Pointcut.makeMatchesNothing(Pointcut.SYMBOLIC); } } FormalBinding[] bindings = buildFormalAdviceBindingsFrom(md); ResolvedPointcutDefinition rpd = new LazyResolvedPointcutDefinition(factory.fromBinding(md.binding.declaringClass), md.modifiers, new String(md.selector), factory.fromBindings(md.binding.parameters), factory.fromBinding(md.binding.returnType), pc, new EclipseScope(bindings, md.scope)); rpd.setPosition(md.sourceStart, md.sourceEnd); rpd.setSourceContext(eSourceContext); return rpd; } private static final char[] joinPoint = "Lorg/aspectj/lang/JoinPoint;".toCharArray(); private static final char[] joinPointStaticPart = "Lorg/aspectj/lang/JoinPoint$StaticPart;".toCharArray(); private static final char[] joinPointEnclosingStaticPart = "Lorg/aspectj/lang/JoinPoint$EnclosingStaticPart;".toCharArray(); private static final char[] proceedingJoinPoint = "Lorg/aspectj/lang/ProceedingJoinPoint;".toCharArray(); private FormalBinding[] buildFormalAdviceBindingsFrom(AbstractMethodDeclaration mDecl) { if (mDecl.arguments == null) { return new FormalBinding[0];
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} if (mDecl.binding == null) { return new FormalBinding[0]; } EclipseFactory factory = EclipseFactory.fromScopeLookupEnvironment(mDecl.scope); String extraArgName = ""; FormalBinding[] ret = new FormalBinding[mDecl.arguments.length]; for (int i = 0; i < mDecl.arguments.length; i++) { Argument arg = mDecl.arguments[i]; String name = new String(arg.name); TypeBinding argTypeBinding = mDecl.binding.parameters[i]; UnresolvedType type = factory.fromBinding(argTypeBinding); if (CharOperation.equals(joinPoint, argTypeBinding.signature()) || CharOperation.equals(joinPointStaticPart, argTypeBinding.signature()) || CharOperation.equals(joinPointEnclosingStaticPart, argTypeBinding.signature()) || CharOperation.equals(proceedingJoinPoint, argTypeBinding.signature()) || name.equals(extraArgName)) { ret[i] = new FormalBinding.ImplicitFormalBinding(type, name, i); } else { ret[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd); } } return ret; } /** * This method may not return all fields, for example it may not include the ajc$initFailureCause or ajc$perSingletonInstance * fields - see bug 129613 */ public ResolvedMember[] getDeclaredFields() { if (declaredFields == null) { fillDeclaredMembers();
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} return declaredFields; } /** * This method may not return all methods, for example it may not include clinit, aspectOf, hasAspect or ajc$postClinit methods * - see bug 129613 */ public ResolvedMember[] getDeclaredMethods() { if (declaredMethods == null) { fillDeclaredMembers(); } return declaredMethods; } public ResolvedMember[] getDeclaredPointcuts() { if (declaredPointcuts == null) { fillDeclaredMembers(); } return declaredPointcuts; } public int getModifiers() { return binding.modifiers & ExtraCompilerModifiers.AccJustFlag; } public String toString() { return "EclipseSourceType(" + new String(binding.sourceName()) + ")"; } public void checkPointcutDeclarations() { ResolvedMember[] pointcuts = getDeclaredPointcuts(); boolean sawError = false;
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
for (int i = 0, len = pointcuts.length; i < len; i++) { if (pointcuts[i] == null) { continue; } if (pointcuts[i].isAbstract()) { if (!this.isAspect()) { eclipseWorld().showMessage(IMessage.ERROR, "abstract pointcut only allowed in aspect" + pointcuts[i].getName(), pointcuts[i].getSourceLocation(), null); sawError = true; } else if (!binding.isAbstract()) { eclipseWorld().showMessage(IMessage.ERROR, "abstract pointcut in concrete aspect" + pointcuts[i], pointcuts[i].getSourceLocation(), null); sawError = true; } } for (int j = i + 1; j < len; j++) { if (pointcuts[j] == null) { continue; } if (pointcuts[i].getName().equals(pointcuts[j].getName())) { eclipseWorld().showMessage(IMessage.ERROR, "duplicate pointcut name: " + pointcuts[j].getName(), pointcuts[i].getSourceLocation(), pointcuts[j].getSourceLocation()); sawError = true; } } }
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
if (sawError || !isAspect()) { return; } getResolvedTypeX().getExposedPointcuts(); } public boolean isInterface() { return binding.isInterface(); } public final static short ACC_ANNOTATION = 0x2000; public final static short ACC_ENUM = 0x4000; public boolean isEnum() { return (binding.getAccessFlags() & ACC_ENUM) != 0;
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} public boolean isAnnotation() { return (binding.getAccessFlags() & ACC_ANNOTATION) != 0; } public boolean isAnnotationWithRuntimeRetention() { if (!isAnnotation()) { return false; } else { return (binding.getAnnotationTagBits() & TagBits.AnnotationRetentionMASK) == TagBits.AnnotationRuntimeRetention; } } public String getRetentionPolicy() { if (isAnnotation()) { if ((binding.getAnnotationTagBits() & TagBits.AnnotationRetentionMASK) == TagBits.AnnotationRuntimeRetention) { return "RUNTIME"; } if ((binding.getAnnotationTagBits() & TagBits.AnnotationRetentionMASK) == TagBits.AnnotationSourceRetention) { return "SOURCE"; } if ((binding.getAnnotationTagBits() & TagBits.AnnotationRetentionMASK) == TagBits.AnnotationClassRetention) { return "CLASS"; } } return null; } public boolean canAnnotationTargetType() { if (isAnnotation()) { return ((binding.getAnnotationTagBits() & TagBits.AnnotationForType) != 0); } return false;
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} public AnnotationTargetKind[] getAnnotationTargetKinds() { if (discoveredAnnotationTargetKinds) { return annotationTargetKinds; } discoveredAnnotationTargetKinds = true; annotationTargetKinds = null;
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
if (isAnnotation()) { List<AnnotationTargetKind> targetKinds = new ArrayList<AnnotationTargetKind>(); if ((binding.getAnnotationTagBits() & TagBits.AnnotationForAnnotationType) != 0) { targetKinds.add(AnnotationTargetKind.ANNOTATION_TYPE); } if ((binding.getAnnotationTagBits() & TagBits.AnnotationForConstructor) != 0) { targetKinds.add(AnnotationTargetKind.CONSTRUCTOR); } if ((binding.getAnnotationTagBits() & TagBits.AnnotationForField) != 0) { targetKinds.add(AnnotationTargetKind.FIELD); } if ((binding.getAnnotationTagBits() & TagBits.AnnotationForLocalVariable) != 0) { targetKinds.add(AnnotationTargetKind.LOCAL_VARIABLE); } if ((binding.getAnnotationTagBits() & TagBits.AnnotationForMethod) != 0) { targetKinds.add(AnnotationTargetKind.METHOD); } if ((binding.getAnnotationTagBits() & TagBits.AnnotationForPackage) != 0) { targetKinds.add(AnnotationTargetKind.PACKAGE); } if ((binding.getAnnotationTagBits() & TagBits.AnnotationForParameter) != 0) { targetKinds.add(AnnotationTargetKind.PARAMETER); } if ((binding.getAnnotationTagBits() & TagBits.AnnotationForType) != 0) { targetKinds.add(AnnotationTargetKind.TYPE); } if (!targetKinds.isEmpty()) { annotationTargetKinds = new AnnotationTargetKind[targetKinds.size()]; return targetKinds.toArray(annotationTargetKinds);
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} } return annotationTargetKinds; } /** * Ensure the annotation types have been resolved, where resolved means the eclipse type bindings have been converted to their * ResolvedType representations. This does not deeply resolve the annotations, it only does the type names. */ private void ensureAnnotationTypesResolved() { int declarationAnnoCount = (declaration.annotations == null ? 0 : declaration.annotations.length); if (!annotationTypesAreResolved || declarationAnnoCount != annotationTypes.length) { Annotation[] as = declaration.annotations; if (as == null) { annotationTypes = ResolvedType.NONE; } else { annotationTypes = new ResolvedType[as.length]; for (int a = 0; a < as.length; a++) { TypeBinding tb = as[a].type.resolveType(declaration.staticInitializerScope); if (tb == null) { annotationTypes[a] = ResolvedType.MISSING; } else { annotationTypes[a] = factory.fromTypeBindingToRTX(tb); } } } annotationTypesAreResolved = true; } } public boolean hasAnnotation(UnresolvedType ofType) {
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
ensureAnnotationTypesResolved(); for (int a = 0, max = annotationTypes.length; a < max; a++) { if (ofType.equals(annotationTypes[a])) { return true; } } return false; } /** * WARNING: This method does not have a complete implementation. * * The aim is that it converts Eclipse annotation objects to the AspectJ form of annotations (the type AnnotationAJ). The * AnnotationX objects returned are wrappers over either a Bcel annotation type or the AspectJ AnnotationAJ type. The minimal * implementation provided here is for processing the RetentionPolicy and Target annotation types - these are the only ones * which the weaver will attempt to process from an EclipseSourceType. * * More notes: The pipeline has required us to implement this. With the pipeline we can be weaving a type and asking questions * of annotations before they have been turned into Bcel objects - ie. when they are still in EclipseSourceType form. Without * the pipeline we would have converted everything to Bcel objects before proceeding with weaving. Because the pipeline won't * start weaving until all aspects have been compiled and the fact that no AspectJ constructs match on the values within * annotations, this code only needs to deal with converting system annotations that the weaver needs to process * (RetentionPolicy, Target). */ public AnnotationAJ[] getAnnotations() { if (annotations != null) { return annotations; } if (!annotationsFullyResolved) { TypeDeclaration.resolveAnnotations(declaration.staticInitializerScope, declaration.annotations, binding); annotationsFullyResolved = true;
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} Annotation[] as = declaration.annotations; if (as == null || as.length == 0) { annotations = AnnotationAJ.EMPTY_ARRAY; } else { annotations = new AnnotationAJ[as.length]; for (int i = 0; i < as.length; i++) { annotations[i] = convertEclipseAnnotation(as[i], factory.getWorld()); } } return annotations; } /** * Convert one eclipse annotation into an AnnotationX object containing an AnnotationAJ object. * * This code and the helper methods used by it will go *BANG* if they encounter anything not currently supported - this is safer * than limping along with a malformed annotation. When the *BANG* is encountered the bug reporter should indicate the kind of * annotation they were working with and this code can be enhanced to support it. */ public AnnotationAJ convertEclipseAnnotation(Annotation eclipseAnnotation, World w) { ResolvedType annotationType = factory.fromTypeBindingToRTX(eclipseAnnotation.type.resolvedType); boolean isRuntimeVisible = (eclipseAnnotation.bits & TagBits.AnnotationRetentionMASK) == TagBits.AnnotationRuntimeRetention; StandardAnnotation annotationAJ = new StandardAnnotation(annotationType, isRuntimeVisible); generateAnnotation(eclipseAnnotation, annotationAJ, w); return annotationAJ; } static class MissingImplementationException extends RuntimeException {
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
MissingImplementationException(String reason) { super(reason); } } /** * Use the information in the supplied eclipse based annotation to fill in the standard annotation. * * @param annotation eclipse based annotation representation * @param annotationAJ AspectJ based annotation representation */ private void generateAnnotation(Annotation annotation, StandardAnnotation annotationAJ, World w) { if (annotation instanceof NormalAnnotation) { NormalAnnotation normalAnnotation = (NormalAnnotation) annotation; MemberValuePair[] memberValuePairs = normalAnnotation.memberValuePairs; if (memberValuePairs != null) { int memberValuePairsLength = memberValuePairs.length; for (int i = 0; i < memberValuePairsLength; i++) { MemberValuePair memberValuePair = memberValuePairs[i]; MethodBinding methodBinding = memberValuePair.binding; if (methodBinding == null) {
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
if (memberValuePair.value instanceof MarkerAnnotation) { MarkerAnnotation eMarkerAnnotation = (MarkerAnnotation) memberValuePair.value; AnnotationBinding eMarkerAnnotationBinding = eMarkerAnnotation.getCompilerAnnotation(); ReferenceBinding eAnnotationType = eMarkerAnnotationBinding.getAnnotationType(); ResolvedType ajAnnotationType = factory.fromTypeBindingToRTX(eAnnotationType); boolean isRuntimeVisible = (eMarkerAnnotation.bits & TagBits.AnnotationRetentionMASK) == TagBits.AnnotationRuntimeRetention; StandardAnnotation ajAnnotation = new StandardAnnotation(ajAnnotationType, isRuntimeVisible); AnnotationValue av = new AnnotationAnnotationValue(ajAnnotation); AnnotationNameValuePair anvp = new AnnotationNameValuePair(new String(memberValuePair.name), av); annotationAJ.addNameValuePair(anvp);
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} else if (memberValuePair.value instanceof Literal) { AnnotationValue av = generateElementValue(memberValuePair.value, ((Literal) memberValuePair.value).resolvedType); AnnotationNameValuePair anvp = new AnnotationNameValuePair(new String(memberValuePair.name), av); annotationAJ.addNameValuePair(anvp); } else if (memberValuePair.value instanceof ArrayInitializer) { ArrayInitializer arrayInitializer = (ArrayInitializer) memberValuePair.value; Expression[] expressions = arrayInitializer.expressions; AnnotationValue[] arrayValues = new AnnotationValue[expressions.length]; for (int e = 0; e < expressions.length; e++) { arrayValues[e] = generateElementValue(expressions[e], ((ArrayBinding) arrayInitializer.resolvedType).leafComponentType); } AnnotationValue array = new ArrayAnnotationValue(arrayValues); AnnotationNameValuePair anvp = new AnnotationNameValuePair(new String(memberValuePair.name), array); annotationAJ.addNameValuePair(anvp); } else { throw new MissingImplementationException( "Please raise an AspectJ bug. AspectJ does not know how to convert this annotation [" + annotation + "]"); } } else { AnnotationValue av = generateElementValue(memberValuePair.value, methodBinding.returnType); AnnotationNameValuePair anvp = new AnnotationNameValuePair(new String(memberValuePair.name), av); annotationAJ.addNameValuePair(anvp); } } } } else if (annotation instanceof SingleMemberAnnotation) {
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
SingleMemberAnnotation singleMemberAnnotation = (SingleMemberAnnotation) annotation; MethodBinding methodBinding = singleMemberAnnotation.memberValuePairs()[0].binding; if (methodBinding == null) { throw new MissingImplementationException( "Please raise an AspectJ bug. AspectJ does not know how to convert this annotation [" + annotation + "]"); } else { AnnotationValue av = generateElementValue(singleMemberAnnotation.memberValue, methodBinding.returnType); annotationAJ.addNameValuePair(new AnnotationNameValuePair(new String( singleMemberAnnotation.memberValuePairs()[0].name), av)); } } else if (annotation instanceof MarkerAnnotation) { return; } else { throw new MissingImplementationException( "Please raise an AspectJ bug. AspectJ does not know how to convert this annotation [" + annotation + "]"); } } private AnnotationValue generateElementValue(Expression defaultValue, TypeBinding memberValuePairReturnType) { Constant constant = defaultValue.constant; TypeBinding defaultValueBinding = defaultValue.resolvedType; if (defaultValueBinding == null) { throw new MissingImplementationException( "Please raise an AspectJ bug. AspectJ does not know how to convert this annotation value [" + defaultValue + "]"); } else { if (memberValuePairReturnType.isArrayType() && !defaultValueBinding.isArrayType()) { if (constant != null && constant != Constant.NotAConstant) { AnnotationValue av = EclipseAnnotationConvertor.generateElementValueForConstantExpression(defaultValue,
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
defaultValueBinding); return new ArrayAnnotationValue(new AnnotationValue[] { av }); } else { AnnotationValue av = generateElementValueForNonConstantExpression(defaultValue, defaultValueBinding); return new ArrayAnnotationValue(new AnnotationValue[] { av }); } } else { if (constant != null && constant != Constant.NotAConstant) { AnnotationValue av = EclipseAnnotationConvertor.generateElementValueForConstantExpression(defaultValue, defaultValueBinding); if (av == null) { throw new MissingImplementationException( "Please raise an AspectJ bug. AspectJ does not know how to convert this annotation value [" + defaultValue + "]"); } return av; } else { AnnotationValue av = generateElementValueForNonConstantExpression(defaultValue, defaultValueBinding); return av; } } } } private AnnotationValue generateElementValueForNonConstantExpression(Expression defaultValue, TypeBinding defaultValueBinding) { if (defaultValueBinding != null) { if (defaultValueBinding.isEnum()) { FieldBinding fieldBinding = null; if (defaultValue instanceof QualifiedNameReference) {
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
QualifiedNameReference nameReference = (QualifiedNameReference) defaultValue; fieldBinding = (FieldBinding) nameReference.binding; } else if (defaultValue instanceof SingleNameReference) { SingleNameReference nameReference = (SingleNameReference) defaultValue; fieldBinding = (FieldBinding) nameReference.binding; } else { throw new MissingImplementationException( "Please raise an AspectJ bug. AspectJ does not know how to convert this annotation value [" + defaultValue + "]"); } if (fieldBinding != null) { String sig = new String(fieldBinding.type.signature()); AnnotationValue enumValue = new EnumAnnotationValue(sig, new String(fieldBinding.name)); return enumValue; } throw new MissingImplementationException( "Please raise an AspectJ bug. AspectJ does not know how to convert this annotation value [" + defaultValue + "]"); } else if (defaultValueBinding.isAnnotationType()) { if (defaultValue instanceof MarkerAnnotation) { ResolvedType ajAnnotationType = factory.fromTypeBindingToRTX(defaultValueBinding); StandardAnnotation ajAnnotation = new StandardAnnotation(ajAnnotationType, ajAnnotationType.isAnnotationWithRuntimeRetention()); AnnotationValue av = new AnnotationAnnotationValue(ajAnnotation); return av; } else if (defaultValue instanceof NormalAnnotation) { NormalAnnotation normalAnnotation = (NormalAnnotation) defaultValue; ResolvedType ajAnnotationType = factory.fromTypeBindingToRTX(defaultValueBinding); StandardAnnotation ajAnnotation = new StandardAnnotation(ajAnnotationType, ajAnnotationType.isAnnotationWithRuntimeRetention());
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
MemberValuePair[] pairs = normalAnnotation.memberValuePairs; if (pairs != null) { for (int p = 0; p < pairs.length; p++) { MemberValuePair pair = pairs[p]; Expression valueEx = pair.value; AnnotationValue pairValue = null; if (valueEx instanceof Literal) { pairValue = generateElementValue(valueEx, ((Literal) valueEx).resolvedType); } else { pairValue = generateElementValue(pair.value, pair.binding.returnType); } ajAnnotation.addNameValuePair(new AnnotationNameValuePair(new String(pair.name), pairValue)); } } AnnotationValue av = new AnnotationAnnotationValue(ajAnnotation); return av; } else { throw new MissingImplementationException( "Please raise an AspectJ bug. AspectJ does not know how to convert this annotation value [" + defaultValue + "]"); } } else if (defaultValueBinding.isArrayType()) { if (defaultValue instanceof ArrayInitializer) { ArrayInitializer arrayInitializer = (ArrayInitializer) defaultValue; int arrayLength = arrayInitializer.expressions != null ? arrayInitializer.expressions.length : 0; AnnotationValue[] values = new AnnotationValue[arrayLength]; for (int i = 0; i < arrayLength; i++) { values[i] = generateElementValue(arrayInitializer.expressions[i], defaultValueBinding.leafComponentType());
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} ArrayAnnotationValue aav = new ArrayAnnotationValue(values); return aav; } else { throw new MissingImplementationException( "Please raise an AspectJ bug. AspectJ does not know how to convert this annotation value [" + defaultValue + "]"); } } else { throw new MissingImplementationException( "Please raise an AspectJ bug. AspectJ does not know how to convert this annotation value [" + defaultValue + "]");
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} } else { throw new MissingImplementationException( "Please raise an AspectJ bug. AspectJ does not know how to convert this annotation value [" + defaultValue + "]"); } } public ResolvedType[] getAnnotationTypes() { ensureAnnotationTypesResolved(); return annotationTypes; } public PerClause getPerClause() { if (!isAnnotationStyleAspect()) { if (declaration instanceof AspectDeclaration) { PerClause pc = ((AspectDeclaration) declaration).perClause;
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
if (pc != null) { return pc; } } return new PerSingleton(); } else { PerClause pc = null; if (declaration instanceof AspectDeclaration) { pc = ((AspectDeclaration) declaration).perClause; } if (pc == null) { PerClause.Kind kind = getPerClauseForTypeDeclaration(declaration); return new PerFromSuper(kind); } return pc; } } PerClause.Kind getPerClauseForTypeDeclaration(TypeDeclaration typeDeclaration) { Annotation[] annotations = typeDeclaration.annotations; for (int i = 0; i < annotations.length; i++) { Annotation annotation = annotations[i]; if (annotation != null && annotation.resolvedType != null && CharOperation.equals(aspectSig, annotation.resolvedType.signature())) { if (annotation.memberValuePairs() == null || annotation.memberValuePairs().length == 0) {
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
PerClause.Kind kind = lookupPerClauseKind(typeDeclaration.binding.superclass); if (kind == null) { return PerClause.SINGLETON; } else { return kind; } } else if (annotation instanceof SingleMemberAnnotation) { SingleMemberAnnotation theAnnotation = (SingleMemberAnnotation) annotation; String clause = new String(((StringLiteral) theAnnotation.memberValue).source()); return determinePerClause(typeDeclaration, clause); } else if (annotation instanceof NormalAnnotation) { NormalAnnotation theAnnotation = (NormalAnnotation) annotation; if (theAnnotation.memberValuePairs == null || theAnnotation.memberValuePairs.length < 1) {
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
return PerClause.SINGLETON; } String clause = new String(((StringLiteral) theAnnotation.memberValuePairs[0].value).source()); return determinePerClause(typeDeclaration, clause); } else { eclipseWorld().showMessage( IMessage.ABORT, "@Aspect annotation is expected to be SingleMemberAnnotation with 'String value()' as unique element", new EclipseSourceLocation(typeDeclaration.compilationResult, typeDeclaration.sourceStart, typeDeclaration.sourceEnd), null); return PerClause.SINGLETON; } } } return null; } private PerClause.Kind determinePerClause(TypeDeclaration typeDeclaration, String clause) { if (clause.startsWith("perthis(")) { return PerClause.PEROBJECT; } else if (clause.startsWith("pertarget(")) { return PerClause.PEROBJECT; } else if (clause.startsWith("percflow(")) { return PerClause.PERCFLOW; } else if (clause.startsWith("percflowbelow(")) { return PerClause.PERCFLOW; } else if (clause.startsWith("pertypewithin(")) {
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
return PerClause.PERTYPEWITHIN; } else if (clause.startsWith("issingleton(")) { return PerClause.SINGLETON; } else { eclipseWorld().showMessage( IMessage.ABORT, "cannot determine perClause '" + clause + "'", new EclipseSourceLocation(typeDeclaration.compilationResult, typeDeclaration.sourceStart, typeDeclaration.sourceEnd), null); return PerClause.SINGLETON; } } private PerClause.Kind lookupPerClauseKind(ReferenceBinding binding) { final PerClause.Kind kind; if (binding instanceof BinaryTypeBinding) { ResolvedType superTypeX = factory.fromEclipse(binding); PerClause perClause = superTypeX.getPerClause(); if (perClause != null) { kind = superTypeX.getPerClause().getKind(); } else { kind = null; } } else if (binding instanceof SourceTypeBinding) { SourceTypeBinding sourceSc = (SourceTypeBinding) binding; if (sourceSc.scope.referenceContext instanceof AspectDeclaration) { kind = ((AspectDeclaration) sourceSc.scope.referenceContext).perClause.getKind();
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
} else { kind = getPerClauseForTypeDeclaration((sourceSc.scope.referenceContext)); } } else { kind = null; } return kind; } public Collection getDeclares() { return declares; } public Collection getPrivilegedAccesses() { return Collections.EMPTY_LIST; } public Collection getTypeMungers() { return typeMungers; } public boolean doesNotExposeShadowMungers() { return true; } public String getDeclaredGenericSignature() { return CharOperation.charToString(binding.genericSignature()); } public boolean isGeneric() { return binding.isGenericType(); }
399,408
Bug 399408 NPE in ExactAnnotationTypePattern.matches
[ERROR] java.lang.NullPointerException [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:137) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(AnyWithAnnotationTypePattern.java:55) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:132) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:885) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:766) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:424) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:410) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:261)
resolved fixed
d524403
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-01-29T17:20:10Z"
"2013-01-29T17:20:00Z"
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
public TypeVariable[] getTypeVariables() { if (declaration.typeParameters == null) { return new TypeVariable[0]; } TypeVariable[] typeVariables = new TypeVariable[declaration.typeParameters.length]; for (int i = 0; i < typeVariables.length; i++) { typeVariables[i] = typeParameter2TypeVariable(declaration.typeParameters[i]); } return typeVariables; } private TypeVariable typeParameter2TypeVariable(TypeParameter typeParameter) { String name = new String(typeParameter.name); ReferenceBinding superclassBinding = typeParameter.binding.superclass; UnresolvedType superclass = UnresolvedType.forSignature(new String(superclassBinding.signature())); UnresolvedType[] superinterfaces = null; ReferenceBinding[] superInterfaceBindings = typeParameter.binding.superInterfaces; if (superInterfaceBindings != null) { superinterfaces = new UnresolvedType[superInterfaceBindings.length]; for (int i = 0; i < superInterfaceBindings.length; i++) { superinterfaces[i] = UnresolvedType.forSignature(new String(superInterfaceBindings[i].signature())); } } TypeVariable tv = new TypeVariable(name, superclass, superinterfaces); tv.setDeclaringElement(factory.fromBinding(typeParameter.binding.declaringElement)); tv.setRank(typeParameter.binding.rank); return tv; } }
399,590
Bug 399590 Bad generics signature generated
null
resolved fixed
4af4b1e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-04T21:33:26Z"
"2013-01-31T08:13:20Z"
org.aspectj.matcher/src/org/aspectj/weaver/BoundedReferenceType.java
/* ******************************************************************* * Copyright (c) 2010 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 * ******************************************************************/ package org.aspectj.weaver; import java.util.Map; /** * A BoundedReferenceType is the result of a generics wildcard expression ? extends String, ? super Foo etc.. * * The "signature" for a bounded reference type follows the generic signature specification in section 4.4 of JVM spec: *,+,- plus * signature strings. * * The bound may be a type variable (e.g. ? super T) * * @author Adrian Colyer * @author Andy Clement */ public class BoundedReferenceType extends ReferenceType {
399,590
Bug 399590 Bad generics signature generated
null
resolved fixed
4af4b1e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-04T21:33:26Z"
"2013-01-31T08:13:20Z"
org.aspectj.matcher/src/org/aspectj/weaver/BoundedReferenceType.java
public static final int UNBOUND = 0; public static final int EXTENDS = 1; public static final int SUPER = 2; public int kind; private ResolvedType lowerBound; private ResolvedType upperBound; protected ReferenceType[] additionalInterfaceBounds = ReferenceType.EMPTY_ARRAY; public BoundedReferenceType(ReferenceType aBound, boolean isExtends, World world) { super((isExtends ? "+" : "-") + aBound.signature, aBound.signatureErasure, world); if (isExtends) { this.kind = EXTENDS; } else { this.kind = SUPER;
399,590
Bug 399590 Bad generics signature generated
null
resolved fixed
4af4b1e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-04T21:33:26Z"
"2013-01-31T08:13:20Z"
org.aspectj.matcher/src/org/aspectj/weaver/BoundedReferenceType.java
} if (isExtends) { upperBound = aBound; } else { lowerBound = aBound; upperBound = world.resolve(UnresolvedType.OBJECT); } setDelegate(new BoundedReferenceTypeDelegate((ReferenceType) getUpperBound())); } public BoundedReferenceType(ReferenceType aBound, boolean isExtends, World world, ReferenceType[] additionalInterfaces) { this(aBound, isExtends, world); this.additionalInterfaceBounds = additionalInterfaces; } /** * only for use when resolving GenericsWildcardTypeX or a TypeVariableReferenceType */ protected BoundedReferenceType(String signature, String erasedSignature, World world) { super(signature, erasedSignature, world); if (signature.equals("*")) { this.kind = UNBOUND; upperBound = world.resolve(UnresolvedType.OBJECT); } else { upperBound = world.resolve(forSignature(erasedSignature)); } setDelegate(new BoundedReferenceTypeDelegate((ReferenceType) upperBound)); } /** * Constructs the BoundedReferenceType representing an unbounded wildcard '?'. In this situation the signature is '*' and the * erased signature is Ljava/lang/Object;
399,590
Bug 399590 Bad generics signature generated
null
resolved fixed
4af4b1e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-04T21:33:26Z"
"2013-01-31T08:13:20Z"
org.aspectj.matcher/src/org/aspectj/weaver/BoundedReferenceType.java
*/ public BoundedReferenceType(World world) { super("*", "Ljava/lang/Object;", world); this.kind = UNBOUND; upperBound = world.resolve(UnresolvedType.OBJECT); setDelegate(new BoundedReferenceTypeDelegate((ReferenceType) upperBound)); } public UnresolvedType getUpperBound() { return upperBound; } public UnresolvedType getLowerBound() { return lowerBound; } public ReferenceType[] getAdditionalBounds() { return additionalInterfaceBounds; } @Override public UnresolvedType parameterize(Map<String, UnresolvedType> typeBindings) { if (this.kind == UNBOUND) { return this; } ReferenceType[] parameterizedAdditionalInterfaces = new ReferenceType[additionalInterfaceBounds == null ? 0 : additionalInterfaceBounds.length]; for (int i = 0; i < parameterizedAdditionalInterfaces.length; i++) { parameterizedAdditionalInterfaces[i] = (ReferenceType) additionalInterfaceBounds[i].parameterize(typeBindings); } if (this.kind == EXTENDS) { return new BoundedReferenceType((ReferenceType) getUpperBound().parameterize(typeBindings), true, world, parameterizedAdditionalInterfaces); } else {
399,590
Bug 399590 Bad generics signature generated
null
resolved fixed
4af4b1e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-04T21:33:26Z"
"2013-01-31T08:13:20Z"
org.aspectj.matcher/src/org/aspectj/weaver/BoundedReferenceType.java
return new BoundedReferenceType((ReferenceType) getLowerBound().parameterize(typeBindings), false, world, parameterizedAdditionalInterfaces); } } public boolean hasLowerBound() { return lowerBound != null; } public boolean isExtends() { return this.kind == EXTENDS; } public boolean isSuper() { return this.kind == SUPER; } public boolean isUnbound() { return this.kind == UNBOUND; } public boolean alwaysMatches(ResolvedType aCandidateType) { if (isExtends()) { return ((ReferenceType) getUpperBound()).isAssignableFrom(aCandidateType); } else if (isSuper()) { return aCandidateType.isAssignableFrom((ReferenceType) getLowerBound()); } else { return true; } } public boolean canBeCoercedTo(ResolvedType aCandidateType) {
399,590
Bug 399590 Bad generics signature generated
null
resolved fixed
4af4b1e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-04T21:33:26Z"
"2013-01-31T08:13:20Z"
org.aspectj.matcher/src/org/aspectj/weaver/BoundedReferenceType.java
if (alwaysMatches(aCandidateType)) { return true; } if (aCandidateType.isGenericWildcard()) { BoundedReferenceType boundedRT = (BoundedReferenceType) aCandidateType; ResolvedType myUpperBound = (ResolvedType) getUpperBound(); ResolvedType myLowerBound = (ResolvedType) getLowerBound(); if (isExtends()) { if (boundedRT.isExtends()) { return myUpperBound.isAssignableFrom((ResolvedType) boundedRT.getUpperBound()); } else if (boundedRT.isSuper()) { return myUpperBound == boundedRT.getLowerBound(); } else { return true; } } else if (isSuper()) { if (boundedRT.isSuper()) { return ((ResolvedType) boundedRT.getLowerBound()).isAssignableFrom(myLowerBound); } else if (boundedRT.isExtends()) { return myLowerBound == boundedRT.getUpperBound(); } else { return true; } } else { return true; } } else { return false; } }
399,590
Bug 399590 Bad generics signature generated
null
resolved fixed
4af4b1e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-04T21:33:26Z"
"2013-01-31T08:13:20Z"
org.aspectj.matcher/src/org/aspectj/weaver/BoundedReferenceType.java
@Override public String getSimpleName() { if (!isExtends() && !isSuper()) { return "?"; } if (isExtends()) { return ("? extends " + getUpperBound().getSimpleName()); } else { return ("? super " + getLowerBound().getSimpleName()); } } @Override public ResolvedType[] getDeclaredInterfaces() { ResolvedType[] interfaces = super.getDeclaredInterfaces(); if (additionalInterfaceBounds.length > 0) { ResolvedType[] allInterfaces = new ResolvedType[interfaces.length + additionalInterfaceBounds.length]; System.arraycopy(interfaces, 0, allInterfaces, 0, interfaces.length); System.arraycopy(additionalInterfaceBounds, 0, allInterfaces, interfaces.length, additionalInterfaceBounds.length); return allInterfaces; } else { return interfaces; } } @Override public boolean isGenericWildcard() { return true; } }
399,590
Bug 399590 Bad generics signature generated
null
resolved fixed
4af4b1e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-04T21:33:26Z"
"2013-01-31T08:13:20Z"
tests/src/org/aspectj/systemtest/ajc172/Ajc172Tests.java
/******************************************************************************* * Copyright (c) 2012 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: * Andy Clement - initial API and implementation *******************************************************************************/ package org.aspectj.systemtest.ajc172; import java.io.File; import junit.framework.Test; import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.Method; import org.aspectj.testing.XMLBasedAjcTestCase; /** * @author Andy Clement */ public class Ajc172Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testIfPointcutNames_pr398246() throws Exception { runTest("if pointcut names"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if"); assertEquals("ajc$if$andy", m.getName());
399,590
Bug 399590 Bad generics signature generated
null
resolved fixed
4af4b1e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-04T21:33:26Z"
"2013-01-31T08:13:20Z"
tests/src/org/aspectj/systemtest/ajc172/Ajc172Tests.java
} public void testIfPointcutNames_pr398246_2() throws Exception { runTest("if pointcut names 2"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if"); assertEquals("ajc$if$fred", m.getName()); } public void testIfPointcutNames_pr398246_3() throws Exception { runTest("if pointcut names 3"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if"); assertEquals("ajc$if$barney", m.getName()); } public void testIfPointcutNames_pr398246_4() throws Exception { runTest("if pointcut names 4"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if"); assertEquals("ajc$if$sid", m.getName()); } public void testIfPointcutNames_pr398246_5() throws Exception { runTest("if pointcut names 5"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if"); assertEquals("ajc$if$ac0cb804", m.getName()); jc = getClassFrom(ajc.getSandboxDirectory(), "X2"); m = getMethodStartsWith(jc, "ajc$if");
399,590
Bug 399590 Bad generics signature generated
null
resolved fixed
4af4b1e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-04T21:33:26Z"
"2013-01-31T08:13:20Z"
tests/src/org/aspectj/systemtest/ajc172/Ajc172Tests.java
assertEquals("ajc$if$ac0cb804", m.getName()); } public void testIfPointcutNames_pr398246_6() throws Exception { runTest("if pointcut names 6"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if",1); assertEquals("ajc$if$aac93da8", m.getName()); m = getMethodStartsWith(jc, "ajc$if",2); assertEquals("ajc$if$1$ae5e778a", m.getName()); } public void testIfPointcutNames_pr398246_7() throws Exception { runTest("if pointcut names 7"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if",1); assertEquals("ajc$if$1$ac0607c", m.getName()); m = getMethodStartsWith(jc, "ajc$if",2); assertEquals("ajc$if$1$1$4d4baf36", m.getName()); } public void testOptionalAspects_pr398588() { runTest("optional aspects"); } public void testInconsistentClassFile_pr389750() { runTest("inconsistent class file"); } public void testInconsistentClassFile_pr389750_2() { runTest("inconsistent class file 2"); } public void testInconsistentClassFile_pr389750_3() {
399,590
Bug 399590 Bad generics signature generated
null
resolved fixed
4af4b1e
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-04T21:33:26Z"
"2013-01-31T08:13:20Z"
tests/src/org/aspectj/systemtest/ajc172/Ajc172Tests.java
runTest("inconsistent class file 3"); } public void testInconsistentClassFile_pr389750_4() { runTest("inconsistent class file 4"); } public void testAnnotationValueError_pr389752_1() { runTest("annotation value error 1"); } public void testAnnotationValueError_pr389752_2() { runTest("annotation value error 2"); } public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Ajc172Tests.class); } @Override protected File getSpecFile() { return new File("../tests/src/org/aspectj/systemtest/ajc172/ajc172.xml"); } }
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
org.aspectj.matcher/src/org/aspectj/weaver/TypeVariable.java
/* ******************************************************************* * Copyright (c) 2005-2010 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 * ******************************************************************/ package org.aspectj.weaver; import java.io.IOException; /** * Represents a type variable with possible bounds. * * @author Adrian Colyer * @author Andy Clement */ public class TypeVariable { public static final TypeVariable[] NONE = new TypeVariable[0]; private String name; private int rank; private UnresolvedType firstbound;
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
org.aspectj.matcher/src/org/aspectj/weaver/TypeVariable.java
private UnresolvedType superclass; private UnresolvedType[] superInterfaces = UnresolvedType.NONE; public static final int UNKNOWN = -1; public static final int METHOD = 1; public static final int TYPE = 2; private int declaringElementKind = UNKNOWN; private TypeVariableDeclaringElement declaringElement; public boolean isResolved = false; private boolean beingResolved = false; /** * Constructor for an unbound type variable, eg. 'T' */ public TypeVariable(String name) { this.name = name; } public TypeVariable(String name, UnresolvedType anUpperBound) { this(name); this.superclass = anUpperBound; } public TypeVariable(String name, UnresolvedType anUpperBound, UnresolvedType[] superInterfaces) { this(name, anUpperBound);
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
org.aspectj.matcher/src/org/aspectj/weaver/TypeVariable.java
this.superInterfaces = superInterfaces; } /** * @return the first bound, either the superclass or if non is specified the first interface or if non are specified then OBJECT */ public UnresolvedType getFirstBound() { if (firstbound != null) { return firstbound; } if (superclass == null || superclass.getSignature().equals("Ljava/lang/Object;")) { if (superInterfaces.length > 0) { firstbound = superInterfaces[0]; } else { firstbound = UnresolvedType.OBJECT; } } else { firstbound = superclass; } return firstbound; } public UnresolvedType getUpperBound() { return superclass; } public UnresolvedType[] getSuperInterfaces() { return superInterfaces; } public String getName() { return name; } /**
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
org.aspectj.matcher/src/org/aspectj/weaver/TypeVariable.java
* resolve all the bounds of this type variable */ public TypeVariable resolve(World world) { if (isResolved) { return this; } if (beingResolved) { return this; } beingResolved = true; TypeVariable resolvedTVar = null; if (declaringElement != null) { if (declaringElementKind == TYPE) { UnresolvedType declaring = (UnresolvedType) declaringElement; ReferenceType rd = (ReferenceType) declaring.resolve(world); TypeVariable[] tVars = rd.getTypeVariables(); for (int i = 0; i < tVars.length; i++) { if (tVars[i].getName().equals(getName())) { resolvedTVar = tVars[i]; break; } } } else { ResolvedMember declaring = (ResolvedMember) declaringElement; TypeVariable[] tvrts = declaring.getTypeVariables(); for (int i = 0; i < tvrts.length; i++) { if (tvrts[i].getName().equals(getName())) { resolvedTVar = tvrts[i];
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
org.aspectj.matcher/src/org/aspectj/weaver/TypeVariable.java
} } } if (resolvedTVar == null) { throw new IllegalStateException(); } } else { resolvedTVar = this; } superclass = resolvedTVar.superclass; superInterfaces = resolvedTVar.superInterfaces; if (superclass != null) { ResolvedType rt = superclass.resolve(world); superclass = rt; } firstbound = getFirstBound().resolve(world); for (int i = 0; i < superInterfaces.length; i++) { superInterfaces[i] = superInterfaces[i].resolve(world);
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
org.aspectj.matcher/src/org/aspectj/weaver/TypeVariable.java
} isResolved = true; beingResolved = false; return this; } /** * answer true if the given type satisfies all of the bound constraints of this type variable. If type variable has not been * resolved then throws IllegalStateException */ public boolean canBeBoundTo(ResolvedType candidate) { if (!isResolved) { throw new IllegalStateException("Can't answer binding questions prior to resolving"); } if (candidate.isGenericWildcard()) { return true; } if (superclass != null && !isASubtypeOf(superclass, candidate)) { return false; } for (int i = 0; i < superInterfaces.length; i++) { if (!isASubtypeOf(superInterfaces[i], candidate)) { return false; } } return true; }
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
org.aspectj.matcher/src/org/aspectj/weaver/TypeVariable.java
private boolean isASubtypeOf(UnresolvedType candidateSuperType, UnresolvedType candidateSubType) { ResolvedType superType = (ResolvedType) candidateSuperType; ResolvedType subType = (ResolvedType) candidateSubType; return superType.isAssignableFrom(subType); } public void setUpperBound(UnresolvedType superclass) { this.firstbound = null; this.superclass = superclass; } public void setAdditionalInterfaceBounds(UnresolvedType[] superInterfaces) { this.firstbound = null; this.superInterfaces = superInterfaces; } public String toDebugString() { return getDisplayName(); } public String getDisplayName() { StringBuffer ret = new StringBuffer(); ret.append(name); if (!getFirstBound().getName().equals("java.lang.Object")) { ret.append(" extends "); ret.append(getFirstBound().getName());
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
org.aspectj.matcher/src/org/aspectj/weaver/TypeVariable.java
if (superInterfaces != null) { for (int i = 0; i < superInterfaces.length; i++) { if (!getFirstBound().equals(superInterfaces[i])) { ret.append(" & "); ret.append(superInterfaces[i].getName()); } } } } return ret.toString(); } @Override public String toString() { return "TypeVar " + getDisplayName(); } /** * Return complete signature, e.g. "T extends Number" would return "T:Ljava/lang/Number;" note: MAY INCLUDE P types if bounds * are parameterized types */ public String getSignature() { StringBuffer sb = new StringBuffer(); sb.append(name); sb.append(":"); sb.append(superclass.getSignature()); if (superInterfaces.length != 0) { sb.append(":"); for (int i = 0; i < superInterfaces.length; i++) { UnresolvedType iBound = superInterfaces[i]; sb.append(iBound.getSignature()); }
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
org.aspectj.matcher/src/org/aspectj/weaver/TypeVariable.java
} return sb.toString(); } /** * @return signature for inclusion in an attribute, there must be no 'P' in it signatures */ public String getSignatureForAttribute() { StringBuffer sb = new StringBuffer(); sb.append(name); sb.append(":"); if (superInterfaces.length == 0) { sb.append(((ResolvedType) superclass).getSignatureForAttribute()); } if (superInterfaces.length != 0) { sb.append(":"); for (int i = 0; i < superInterfaces.length; i++) { ResolvedType iBound = (ResolvedType) superInterfaces[i]; sb.append(iBound.getSignatureForAttribute()); } } return sb.toString(); } public void setRank(int rank) { this.rank = rank; } public int getRank() { return rank; } public void setDeclaringElement(TypeVariableDeclaringElement element) { this.declaringElement = element;
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
org.aspectj.matcher/src/org/aspectj/weaver/TypeVariable.java
if (element instanceof UnresolvedType) { this.declaringElementKind = TYPE; } else { this.declaringElementKind = METHOD; } } public TypeVariableDeclaringElement getDeclaringElement() { return declaringElement; } public void setDeclaringElementKind(int kind) { this.declaringElementKind = kind; } public int getDeclaringElementKind() { return declaringElementKind; } public void write(CompressingDataOutputStream s) throws IOException { s.writeUTF(name); superclass.write(s); if (superInterfaces.length == 0) { s.writeInt(0); } else { s.writeInt(superInterfaces.length); for (int i = 0; i < superInterfaces.length; i++) { UnresolvedType ibound = superInterfaces[i]; ibound.write(s); } } }
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
org.aspectj.matcher/src/org/aspectj/weaver/TypeVariable.java
public static TypeVariable read(VersionedDataInputStream s) throws IOException { String name = s.readUTF(); UnresolvedType ubound = UnresolvedType.read(s); int iboundcount = s.readInt(); UnresolvedType[] ibounds = UnresolvedType.NONE; if (iboundcount > 0) { ibounds = new UnresolvedType[iboundcount]; for (int i = 0; i < iboundcount; i++) { ibounds[i] = UnresolvedType.read(s); } } TypeVariable newVariable = new TypeVariable(name, ubound, ibounds); return newVariable; } public String getGenericSignature() { return "T" + name + ";"; } public String getErasureSignature() { return getFirstBound().getErasureSignature(); } public UnresolvedType getSuperclass() { return superclass; } public void setSuperclass(UnresolvedType superclass) { this.firstbound = null; this.superclass = superclass; } }
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
tests/src/org/aspectj/systemtest/ajc172/Ajc172Tests.java
/******************************************************************************* * Copyright (c) 2012 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: * Andy Clement - initial API and implementation *******************************************************************************/ package org.aspectj.systemtest.ajc172; import java.io.File; import junit.framework.Test; import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.Method; import org.aspectj.testing.XMLBasedAjcTestCase; /** * @author Andy Clement */ public class Ajc172Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testPSignatures_pr399590() throws Exception {
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
tests/src/org/aspectj/systemtest/ajc172/Ajc172Tests.java
runTest("p signatures 1"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(),"Cage"); String sss = jc.getSignatureAttribute().getSignature(); assertEquals("<T:LAnimal<+LCage<TT;>;>;>LBar;", sss); jc = getClassFrom(ajc.getSandboxDirectory(),"Cage2"); sss = jc.getSignatureAttribute().getSignature(); assertEquals("<T:LAnimal2<+LCage2<TT;>;>;>LBar2;Ljava/io/Serializable;", sss); jc = getClassFrom(ajc.getSandboxDirectory(),"Cage2"); } public void testPSignatures_pr399590_2() throws Exception { runTest("p signatures 2"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(),"Cage"); String sss = jc.getSignatureAttribute().getSignature(); assertEquals("<T:LAnimal<+LCage<TT;LIntf;>;LIntf;>;Q:Ljava/lang/Object;>LBar;", sss); jc = getClassFrom(ajc.getSandboxDirectory(),"Cage2"); sss = jc.getSignatureAttribute().getSignature(); assertEquals("<T:LAnimal2<+LCage2<TT;LIntf2;>;LIntf2;>;Q:Ljava/lang/Object;>LBar2;Ljava/io/Serializable;", sss); jc = getClassFrom(ajc.getSandboxDirectory(),"Cage2"); } public void testPSignatures_pr399590_3() throws Exception { runTest("p signatures 3"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(),"Cage"); String sss = jc.getSignatureAttribute().getSignature(); assertEquals("<T:LAnimal<-LXXX<TT;>;>;>LBar;", sss); jc = getClassFrom(ajc.getSandboxDirectory(),"Cage2"); sss = jc.getSignatureAttribute().getSignature();
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
tests/src/org/aspectj/systemtest/ajc172/Ajc172Tests.java
assertEquals("<T:LAnimal2<-LXXX2<TT;>;>;>LBar2;Ljava/io/Serializable;", sss); jc = getClassFrom(ajc.getSandboxDirectory(),"Cage2"); } public void testPSignatures_pr399590_4() throws Exception { runTest("p signatures 4"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(),"Cage"); String sss = jc.getSignatureAttribute().getSignature(); assertEquals("<T:LAnimal<-LXXX<TT;>;LYYY;>;>LBar;", sss); jc = getClassFrom(ajc.getSandboxDirectory(),"Cage2"); sss = jc.getSignatureAttribute().getSignature(); assertEquals("<T:LAnimal2<-LXXX2<TT;>;LYYY2;>;>LBar2;Ljava/io/Serializable;", sss); jc = getClassFrom(ajc.getSandboxDirectory(),"Cage2"); } public void testPSignatures_pr399590_5() throws Exception { runTest("p signatures 5"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(),"Cage"); String sss = jc.getSignatureAttribute().getSignature(); assertEquals("<T:LAnimal<*>;>LBar;", sss); jc = getClassFrom(ajc.getSandboxDirectory(),"Cage2"); sss = jc.getSignatureAttribute().getSignature(); assertEquals("<T:LAnimal2<*>;>LBar2;Ljava/io/Serializable;", sss); jc = getClassFrom(ajc.getSandboxDirectory(),"Cage2"); } public void testIfPointcutNames_pr398246() throws Exception { runTest("if pointcut names"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if"); assertEquals("ajc$if$andy", m.getName());
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
tests/src/org/aspectj/systemtest/ajc172/Ajc172Tests.java
} public void testIfPointcutNames_pr398246_2() throws Exception { runTest("if pointcut names 2"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if"); assertEquals("ajc$if$fred", m.getName()); } public void testIfPointcutNames_pr398246_3() throws Exception { runTest("if pointcut names 3"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if"); assertEquals("ajc$if$barney", m.getName()); } public void testIfPointcutNames_pr398246_4() throws Exception { runTest("if pointcut names 4"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if"); assertEquals("ajc$if$sid", m.getName()); } public void testIfPointcutNames_pr398246_5() throws Exception { runTest("if pointcut names 5"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if"); assertEquals("ajc$if$ac0cb804", m.getName()); jc = getClassFrom(ajc.getSandboxDirectory(), "X2"); m = getMethodStartsWith(jc, "ajc$if");
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
tests/src/org/aspectj/systemtest/ajc172/Ajc172Tests.java
assertEquals("ajc$if$ac0cb804", m.getName()); } public void testIfPointcutNames_pr398246_6() throws Exception { runTest("if pointcut names 6"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if",1); assertEquals("ajc$if$aac93da8", m.getName()); m = getMethodStartsWith(jc, "ajc$if",2); assertEquals("ajc$if$1$ae5e778a", m.getName()); } public void testIfPointcutNames_pr398246_7() throws Exception { runTest("if pointcut names 7"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X"); Method m = getMethodStartsWith(jc, "ajc$if",1); assertEquals("ajc$if$1$ac0607c", m.getName()); m = getMethodStartsWith(jc, "ajc$if",2); assertEquals("ajc$if$1$1$4d4baf36", m.getName()); } public void testOptionalAspects_pr398588() { runTest("optional aspects"); } public void testInconsistentClassFile_pr389750() { runTest("inconsistent class file"); } public void testInconsistentClassFile_pr389750_2() { runTest("inconsistent class file 2"); } public void testInconsistentClassFile_pr389750_3() {
394,535
Bug 394535 Java throws OutOfMemory in call to Class.getGenericSuperclass() on woven class
null
resolved fixed
46f9079
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T18:45:03Z"
"2012-11-18T14:46:40Z"
tests/src/org/aspectj/systemtest/ajc172/Ajc172Tests.java
runTest("inconsistent class file 3"); } public void testInconsistentClassFile_pr389750_4() { runTest("inconsistent class file 4"); } public void testAnnotationValueError_pr389752_1() { runTest("annotation value error 1"); } public void testAnnotationValueError_pr389752_2() { runTest("annotation value error 2"); } public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Ajc172Tests.class); } @Override protected File getSpecFile() { return new File("../tests/src/org/aspectj/systemtest/ajc172/ajc172.xml"); } }
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/WeaverMessages.java
/******************************************************************************* * Copyright (c) 2004 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.weaver; import java.text.MessageFormat; import java.util.ResourceBundle; public class WeaverMessages { private static ResourceBundle bundle = ResourceBundle.getBundle("org.aspectj.weaver.weaver-messages"); public static final String ARGS_IN_DECLARE = "argsInDeclare"; public static final String CFLOW_IN_DECLARE = "cflowInDeclare"; public static final String IF_IN_DECLARE = "ifInDeclare"; public static final String THIS_OR_TARGET_IN_DECLARE = "thisOrTargetInDeclare"; public static final String ABSTRACT_POINTCUT = "abstractPointcut"; public static final String POINCUT_NOT_CONCRETE = "abstractPointcutNotMadeConcrete"; public static final String POINTCUT_NOT_VISIBLE = "pointcutNotVisible"; public static final String CONFLICTING_INHERITED_POINTCUTS = "conflictingInheritedPointcuts"; public static final String CIRCULAR_POINTCUT = "circularPointcutDeclaration"; public static final String CANT_FIND_POINTCUT = "cantFindPointcut"; public static final String EXACT_TYPE_PATTERN_REQD = "exactTypePatternRequired"; public static final String CANT_BIND_TYPE = "cantBindType"; public static final String WILDCARD_NOT_ALLOWED = "wildcardTypePatternNotAllowed"; public static final String FIELDS_CANT_HAVE_VOID_TYPE = "fieldCantBeVoid";
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/WeaverMessages.java
public static final String NO_NEWARRAY_JOINPOINTS_BY_DEFAULT = "noNewArrayJoinpointsByDefault"; public static final String UNSUPPORTED_POINTCUT_PRIMITIVE = "unsupportedPointcutPrimitive"; public static final String MISSING_TYPE_PREVENTS_MATCH = "missingTypePreventsMatch"; public static final String DECP_OBJECT = "decpObject"; public static final String CANT_EXTEND_SELF = "cantExtendSelf"; public static final String INTERFACE_CANT_EXTEND_CLASS = "interfaceExtendClass"; public static final String DECP_HIERARCHY_ERROR = "decpHierarchy"; public static final String MULTIPLE_MATCHES_IN_PRECEDENCE = "multipleMatchesInPrecedence"; public static final String TWO_STARS_IN_PRECEDENCE = "circularityInPrecedenceStar"; public static final String CLASSES_IN_PRECEDENCE = "nonAspectTypesInPrecedence"; public static final String TWO_PATTERN_MATCHES_IN_PRECEDENCE = "circularityInPrecedenceTwo"; public static final String NOT_THROWABLE = "notThrowable"; public static final String ITD_CONS_ON_ASPECT = "itdConsOnAspect"; public static final String ITD_RETURN_TYPE_MISMATCH = "returnTypeMismatch"; public static final String ITD_PARAM_TYPE_MISMATCH = "paramTypeMismatch"; public static final String ITD_VISIBILITY_REDUCTION = "visibilityReduction"; public static final String ITD_DOESNT_THROW = "doesntThrow"; public static final String ITD_OVERRIDDEN_STATIC = "overriddenStatic"; public static final String ITD_OVERIDDING_STATIC = "overridingStatic"; public static final String ITD_CONFLICT = "itdConflict"; public static final String ITD_MEMBER_CONFLICT = "itdMemberConflict"; public static final String ITD_NON_EXPOSED_IMPLEMENTOR = "itdNonExposedImplementor"; public static final String ITD_ABSTRACT_MUST_BE_PUBLIC_ON_INTERFACE = "itdAbstractMustBePublicOnInterface"; public static final String CANT_OVERRIDE_FINAL_MEMBER = "cantOverrideFinalMember"; public static final String NON_VOID_RETURN = "nonVoidReturn"; public static final String INCOMPATIBLE_RETURN_TYPE = "incompatibleReturnType"; public static final String CANT_THROW_CHECKED = "cantThrowChecked"; public static final String CIRCULAR_DEPENDENCY = "circularDependency"; public static final String MISSING_PER_CLAUSE = "missingPerClause"; public static final String WRONG_PER_CLAUSE = "wrongPerClause";
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/WeaverMessages.java
public static final String ALREADY_WOVEN = "alreadyWoven"; public static final String REWEAVABLE_MODE = "reweavableMode"; public static final String PROCESSING_REWEAVABLE = "processingReweavable"; public static final String MISSING_REWEAVABLE_TYPE = "missingReweavableType"; public static final String VERIFIED_REWEAVABLE_TYPE = "verifiedReweavableType"; public static final String ASPECT_NEEDED = "aspectNeeded"; public static final String REWEAVABLE_ASPECT_NOT_REGISTERED = "reweavableAspectNotRegistered"; public static final String CANT_FIND_TYPE = "cantFindType"; public static final String CANT_FIND_CORE_TYPE = "cantFindCoreType"; public static final String CANT_FIND_TYPE_WITHINPCD = "cantFindTypeWithinpcd"; public static final String CANT_FIND_TYPE_DURING_AROUND_WEAVE = "cftDuringAroundWeave"; public static final String CANT_FIND_TYPE_DURING_AROUND_WEAVE_PREINIT = "cftDuringAroundWeavePreinit"; public static final String CANT_FIND_TYPE_EXCEPTION_TYPE = "cftExceptionType"; public static final String CANT_FIND_TYPE_ARG_TYPE = "cftArgType"; public static final String CANT_FIND_PARENT_TYPE = "cantFindParentType"; public static final String CANT_FIND_PARENT_TYPE_NO_SUB = "cantFindParentTypeNoSub"; public static final String CANT_FIND_TYPE_FIELDS = "cantFindTypeFields"; public static final String CANT_FIND_TYPE_SUPERCLASS = "cantFindTypeSuperclass"; public static final String CANT_FIND_TYPE_INTERFACES = "cantFindTypeInterfaces"; public static final String CANT_FIND_TYPE_METHODS = "cantFindTypeMethods"; public static final String CANT_FIND_TYPE_POINTCUTS = "cantFindTypePointcuts"; public static final String CANT_FIND_TYPE_MODIFIERS = "cantFindTypeModifiers"; public static final String CANT_FIND_TYPE_ANNOTATION = "cantFindTypeAnnotation"; public static final String CANT_FIND_TYPE_ASSIGNABLE = "cantFindTypeAssignable"; public static final String CANT_FIND_TYPE_COERCEABLE = "cantFindTypeCoerceable"; public static final String CANT_FIND_TYPE_JOINPOINT = "cantFindTypeJoinPoint"; public static final String CANT_FIND_TYPE_INTERFACE_METHODS = "cantFindTypeInterfaceMethods"; public static final String DECP_BINARY_LIMITATION = "decpBinaryLimitation"; public static final String OVERWRITE_JSR45 = "overwriteJSR45"; public static final String IF_IN_PERCLAUSE = "ifInPerClause";
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/WeaverMessages.java
public static final String IF_LEXICALLY_IN_CFLOW = "ifLexicallyInCflow"; public static final String ONLY_BEFORE_ON_HANDLER = "onlyBeforeOnHandler"; public static final String NO_AROUND_ON_SYNCHRONIZATION = "noAroundOnSynchronization"; public static final String AROUND_ON_PREINIT = "aroundOnPreInit"; public static final String AROUND_ON_INIT = "aroundOnInit"; public static final String AROUND_ON_INTERFACE_STATICINIT = "aroundOnInterfaceStaticInit"; public static final String PROBLEM_GENERATING_METHOD = "problemGeneratingMethod"; public static final String CLASS_TOO_BIG = "classTooBig"; public static final String ZIPFILE_ENTRY_MISSING = "zipfileEntryMissing"; public static final String ZIPFILE_ENTRY_INVALID = "zipfileEntryInvalid"; public static final String DIRECTORY_ENTRY_MISSING = "directoryEntryMissing"; public static final String OUTJAR_IN_INPUT_PATH = "outjarInInputPath"; public static final String XLINT_LOAD_ERROR = "problemLoadingXLint"; public static final String XLINTDEFAULT_LOAD_ERROR = "unableToLoadXLintDefault"; public static final String XLINTDEFAULT_LOAD_PROBLEM = "errorLoadingXLintDefault"; public static final String XLINT_KEY_ERROR = "invalidXLintKey"; public static final String XLINT_VALUE_ERROR = "invalidXLintMessageKind"; public static final String UNBOUND_FORMAL = "unboundFormalInPC"; public static final String AMBIGUOUS_BINDING = "ambiguousBindingInPC"; public static final String AMBIGUOUS_BINDING_IN_OR = "ambiguousBindingInOrPC"; public static final String NEGATION_DOESNT_ALLOW_BINDING = "negationDoesntAllowBinding"; public static final String ITDC_ON_ENUM_NOT_ALLOWED = "itdcOnEnumNotAllowed"; public static final String ITDM_ON_ENUM_NOT_ALLOWED = "itdmOnEnumNotAllowed"; public static final String ITDF_ON_ENUM_NOT_ALLOWED = "itdfOnEnumNotAllowed"; public static final String CANT_DECP_ON_ENUM_TO_IMPL_INTERFACE = "cantDecpOnEnumToImplInterface"; public static final String CANT_DECP_ON_ENUM_TO_EXTEND_CLASS = "cantDecpOnEnumToExtendClass"; public static final String CANT_DECP_TO_MAKE_ENUM_SUPERTYPE = "cantDecpToMakeEnumSupertype"; public static final String ITDC_ON_ANNOTATION_NOT_ALLOWED = "itdcOnAnnotationNotAllowed"; public static final String ITDM_ON_ANNOTATION_NOT_ALLOWED = "itdmOnAnnotationNotAllowed";
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/WeaverMessages.java
public static final String ITDF_ON_ANNOTATION_NOT_ALLOWED = "itdfOnAnnotationNotAllowed"; public static final String CANT_DECP_ON_ANNOTATION_TO_IMPL_INTERFACE = "cantDecpOnAnnotationToImplInterface"; public static final String CANT_DECP_ON_ANNOTATION_TO_EXTEND_CLASS = "cantDecpOnAnnotationToExtendClass"; public static final String CANT_DECP_TO_MAKE_ANNOTATION_SUPERTYPE = "cantDecpToMakeAnnotationSupertype"; public static final String REFERENCE_TO_NON_ANNOTATION_TYPE = "referenceToNonAnnotationType"; public static final String BINDING_NON_RUNTIME_RETENTION_ANNOTATION = "bindingNonRuntimeRetentionAnnotation"; public static final String INCORRECT_TARGET_FOR_DECLARE_ANNOTATION = "incorrectTargetForDeclareAnnotation"; public static final String NO_MATCH_BECAUSE_SOURCE_RETENTION = "noMatchBecauseSourceRetention"; public static final String INVALID_ANNOTATION_VALUE = "invalidAnnotationValue"; public static final String UNKNOWN_ANNOTATION_VALUE = "unknownAnnotationValue"; public static final String ATANNOTATION_ONLY_SUPPORTED_AT_JAVA5_LEVEL = "atannotationNeedsJava5"; public static final String ATWITHIN_ONLY_SUPPORTED_AT_JAVA5_LEVEL = "atwithinNeedsJava5"; public static final String ATWITHINCODE_ONLY_SUPPORTED_AT_JAVA5_LEVEL = "atwithincodeNeedsJava5"; public static final String ATTHIS_ONLY_SUPPORTED_AT_JAVA5_LEVEL = "atthisNeedsJava5"; public static final String ATTARGET_ONLY_SUPPORTED_AT_JAVA5_LEVEL = "attargetNeedsJava5"; public static final String ATARGS_ONLY_SUPPORTED_AT_JAVA5_LEVEL = "atargsNeedsJava5"; public static final String DECLARE_ATTYPE_ONLY_SUPPORTED_AT_JAVA5_LEVEL = "declareAtTypeNeedsJava5"; public static final String DECLARE_ATMETHOD_ONLY_SUPPORTED_AT_JAVA5_LEVEL = "declareAtMethodNeedsJava5"; public static final String DECLARE_ATFIELD_ONLY_SUPPORTED_AT_JAVA5_LEVEL = "declareAtFieldNeedsJava5"; public static final String DECLARE_ATCONS_ONLY_SUPPORTED_AT_JAVA5_LEVEL = "declareAtConsNeedsJava5"; public static final String ANNOTATIONS_NEED_JAVA5 = "annotationsRequireJava5"; public static final String CANT_DECP_MULTIPLE_PARAMETERIZATIONS = "cantDecpMultipleParameterizations"; public static final String HANDLER_PCD_DOESNT_SUPPORT_PARAMETERS = "noParameterizedTypePatternInHandler"; public static final String INCORRECT_NUMBER_OF_TYPE_ARGUMENTS = "incorrectNumberOfTypeArguments"; public static final String VIOLATES_TYPE_VARIABLE_BOUNDS = "violatesTypeVariableBounds"; public static final String NO_STATIC_INIT_JPS_FOR_PARAMETERIZED_TYPES = "noStaticInitJPsForParameterizedTypes"; public static final String NOT_A_GENERIC_TYPE = "notAGenericType";
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/WeaverMessages.java
public static final String WITHIN_PCD_DOESNT_SUPPORT_PARAMETERS = "noParameterizedTypePatternInWithin"; public static final String THIS_AND_TARGET_DONT_SUPPORT_PARAMETERS = "noParameterizedTypesInThisAndTarget"; public static final String GET_AND_SET_DONT_SUPPORT_DEC_TYPE_PARAMETERS = "noParameterizedTypesInGetAndSet"; public static final String NO_INIT_JPS_FOR_PARAMETERIZED_TYPES = "noInitJPsForParameterizedTypes"; public static final String NO_GENERIC_THROWABLES = "noGenericThrowables"; public static final String WITHINCODE_DOESNT_SUPPORT_PARAMETERIZED_DECLARING_TYPES = "noParameterizedDeclaringTypesWithinCode"; public static final String EXECUTION_DOESNT_SUPPORT_PARAMETERIZED_DECLARING_TYPES = "noParameterizedDeclaringTypesInExecution"; public static final String CALL_DOESNT_SUPPORT_PARAMETERIZED_DECLARING_TYPES = "noParameterizedDeclaringTypesInCall"; public static final String CANT_REFERENCE_POINTCUT_IN_RAW_TYPE = "noRawTypePointcutReferences"; public static final String HAS_MEMBER_NOT_ENABLED = "hasMemberNotEnabled"; public static final String RETURNING_FORMAL_NOT_DECLARED_IN_ADVICE = "returningFormalNotDeclaredInAdvice"; public static final String THROWN_FORMAL_NOT_DECLARED_IN_ADVICE = "thrownFormalNotDeclaredInAdvice"; public static String format(String key) { return bundle.getString(key); } public static String format(String key, Object insert) { return MessageFormat.format(bundle.getString(key), new Object[] { insert }); } public static String format(String key, Object insert1, Object insert2) { return MessageFormat.format(bundle.getString(key), new Object[] { insert1, insert2 }); } public static String format(String key, Object insert1, Object insert2, Object insert3) { return MessageFormat.format(bundle.getString(key), new Object[] { insert1, insert2, insert3 }); } public static String format(String key, Object insert1, Object insert2, Object insert3, Object insert4) { return MessageFormat.format(bundle.getString(key), new Object[] { insert1, insert2, insert3, insert4 }); } }
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
/* ******************************************************************* * Copyright (c) 2004 IBM Corporation. * 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 * * ******************************************************************/ package org.aspectj.weaver.patterns; import java.io.IOException; import java.util.HashMap; import java.util.Iterator;
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
import java.util.Map; import java.util.Set; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.MessageUtil; import org.aspectj.util.FuzzyBoolean; import org.aspectj.weaver.AjAttribute.WeaverVersionInfo; import org.aspectj.weaver.AnnotatedElement; import org.aspectj.weaver.BCException; import org.aspectj.weaver.CompressingDataOutputStream; import org.aspectj.weaver.ISourceContext; import org.aspectj.weaver.ResolvedMember; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.VersionedDataInputStream; import org.aspectj.weaver.WeaverMessages; import org.aspectj.weaver.World; /** * @author colyer * @author Andy Clement */ public class WildAnnotationTypePattern extends AnnotationTypePattern { private TypePattern typePattern; private boolean resolved = false; Map<String, String> annotationValues; public WildAnnotationTypePattern(TypePattern typePattern) { super(); this.typePattern = typePattern; this.setLocation(typePattern.getSourceContext(), typePattern.start, typePattern.end); } public WildAnnotationTypePattern(TypePattern typePattern, Map<String, String> annotationValues) {
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
super(); this.typePattern = typePattern; this.annotationValues = annotationValues; this.setLocation(typePattern.getSourceContext(), typePattern.start, typePattern.end); } public TypePattern getTypePattern() { return typePattern; } /* * (non-Javadoc) * * @see org.aspectj.weaver.patterns.AnnotationTypePattern#matches(org.aspectj.weaver.AnnotatedElement) */ @Override public FuzzyBoolean matches(AnnotatedElement annotated) { return matches(annotated, null); } /** * Resolve any annotation values specified, checking they are all well formed (valid names, valid values) * * @param annotationType the annotation type for which the values have been specified * @param scope the scope within which to resolve type references (eg. Color.GREEN) */ protected void resolveAnnotationValues(ResolvedType annotationType, IScope scope) { if (annotationValues == null) { return; }
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
Map<String,String> replacementValues = new HashMap<String,String>(); Set<String> keys = annotationValues.keySet(); ResolvedMember[] ms = annotationType.getDeclaredMethods(); for (String k: keys) { String key = k; if (k.endsWith("!")) { key = key.substring(0, k.length() - 1); } String v = annotationValues.get(k); boolean validKey = false; for (int i = 0; i < ms.length; i++) { ResolvedMember resolvedMember = ms[i]; if (resolvedMember.getName().equals(key) && resolvedMember.isAbstract()) { validKey = true; ResolvedType t = resolvedMember.getReturnType().resolve(scope.getWorld()); if (t.isEnum()) { int pos = v.lastIndexOf("."); if (pos == -1) { IMessage m = MessageUtil.error( WeaverMessages.format(WeaverMessages.INVALID_ANNOTATION_VALUE, v, "enum"), getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); } else { String typename = v.substring(0, pos); ResolvedType rt = scope.lookupType(typename, this).resolve(scope.getWorld()); v = rt.getSignature() + v.substring(pos + 1); replacementValues.put(k, v);
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
break; } } else if (t.isPrimitiveType()) { if (t.getSignature() == "I") { try { int value = Integer.parseInt(v); replacementValues.put(k, Integer.toString(value)); break; } catch (NumberFormatException nfe) { IMessage m = MessageUtil.error( WeaverMessages.format(WeaverMessages.INVALID_ANNOTATION_VALUE, v, "int"), getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); } } else if (t.getSignature() == "F") { try { float value = Float.parseFloat(v); replacementValues.put(k, Float.toString(value)); break; } catch (NumberFormatException nfe) { IMessage m = MessageUtil.error( WeaverMessages.format(WeaverMessages.INVALID_ANNOTATION_VALUE, v, "float"), getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); } } else if (t.getSignature() == "Z") { if (v.equalsIgnoreCase("true") || v.equalsIgnoreCase("false")) { } else { IMessage m = MessageUtil.error(
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
WeaverMessages.format(WeaverMessages.INVALID_ANNOTATION_VALUE, v, "boolean"), getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); } } else if (t.getSignature() == "S") { try { short value = Short.parseShort(v); replacementValues.put(k, Short.toString(value)); break; } catch (NumberFormatException nfe) { IMessage m = MessageUtil.error( WeaverMessages.format(WeaverMessages.INVALID_ANNOTATION_VALUE, v, "short"), getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); } } else if (t.getSignature() == "J") { try { replacementValues.put(k, Long.toString(Long.parseLong(v))); break; } catch (NumberFormatException nfe) { IMessage m = MessageUtil.error( WeaverMessages.format(WeaverMessages.INVALID_ANNOTATION_VALUE, v, "long"), getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); } } else if (t.getSignature() == "D") { try { replacementValues.put(k, Double.toString(Double.parseDouble(v))); break; } catch (NumberFormatException nfe) {
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
IMessage m = MessageUtil.error( WeaverMessages.format(WeaverMessages.INVALID_ANNOTATION_VALUE, v, "double"), getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); } } else if (t.getSignature() == "B") { try { replacementValues.put(k, Byte.toString(Byte.parseByte(v))); break; } catch (NumberFormatException nfe) { IMessage m = MessageUtil.error( WeaverMessages.format(WeaverMessages.INVALID_ANNOTATION_VALUE, v, "byte"), getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); } } else if (t.getSignature() == "C") { if (v.length() != 3) { IMessage m = MessageUtil.error( WeaverMessages.format(WeaverMessages.INVALID_ANNOTATION_VALUE, v, "char"), getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); } else { replacementValues.put(k, v.substring(1, 2)); break; } } else { throw new RuntimeException("Not implemented for " + t); } } else if (t.equals(ResolvedType.JL_STRING)) {
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
} else if (t.equals(ResolvedType.JL_CLASS)) { String typename = v.substring(0, v.lastIndexOf('.')); ResolvedType rt = scope.lookupType(typename, this).resolve(scope.getWorld()); if (rt.isMissing()) { IMessage m = MessageUtil.error("Unable to resolve type '" + v + "' specified for value '" + k + "'", getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); } replacementValues.put(k, rt.getSignature()); break; } else { if (t.isAnnotation()) { if (v.indexOf("(") != -1) { throw new RuntimeException( "Compiler limitation: annotation values can only currently be marker annotations (no values): " + v); } String typename = v.substring(1); ResolvedType rt = scope.lookupType(typename, this).resolve(scope.getWorld()); if (rt.isMissing()) { IMessage m = MessageUtil.error( "Unable to resolve type '" + v + "' specified for value '" + k + "'", getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); } replacementValues.put(k, rt.getSignature()); break; } else { throw new RuntimeException("Compiler limitation: annotation value support not implemented for type " + t); }
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
} } } if (!validKey) { IMessage m = MessageUtil.error(WeaverMessages.format(WeaverMessages.UNKNOWN_ANNOTATION_VALUE, annotationType, k), getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); } } annotationValues.putAll(replacementValues); } @Override public FuzzyBoolean matches(AnnotatedElement annotated, ResolvedType[] parameterAnnotations) { if (!resolved) { throw new IllegalStateException("Can't match on an unresolved annotation type pattern"); } if (annotationValues != null && !typePattern.hasFailedResolution()) { throw new IllegalStateException("Cannot use annotationvalues with a wild annotation pattern"); } if (isForParameterAnnotationMatch()) { if (parameterAnnotations != null && parameterAnnotations.length != 0) { for (int i = 0; i < parameterAnnotations.length; i++) { if (typePattern.matches(parameterAnnotations[i], TypePattern.STATIC).alwaysTrue()) { return FuzzyBoolean.YES; } } } } else {
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
ResolvedType[] annTypes = annotated.getAnnotationTypes(); if (annTypes != null && annTypes.length != 0) { for (int i = 0; i < annTypes.length; i++) { if (typePattern.matches(annTypes[i], TypePattern.STATIC).alwaysTrue()) { return FuzzyBoolean.YES; } } } } return FuzzyBoolean.NO; } /* * (non-Javadoc) * * @see org.aspectj.weaver.patterns.AnnotationTypePattern#resolve(org.aspectj.weaver.World) */ @Override public void resolve(World world) { if (!resolved) { if (typePattern instanceof WildTypePattern && (annotationValues == null || annotationValues.isEmpty())) { WildTypePattern wildTypePattern = (WildTypePattern) typePattern; String fullyQualifiedName = wildTypePattern.maybeGetCleanName(); if (fullyQualifiedName != null && fullyQualifiedName.indexOf(".") != -1) { ResolvedType resolvedType = world.resolve(UnresolvedType.forName(fullyQualifiedName)); if (resolvedType != null && !resolvedType.isMissing()) { typePattern = new ExactTypePattern(resolvedType, false, false); } }
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
} resolved = true; } } /** * This can modify in place, or return a new TypePattern if the type changes. */ @Override public AnnotationTypePattern resolveBindings(IScope scope, Bindings bindings, boolean allowBinding) { if (!scope.getWorld().isInJava5Mode()) { scope.message(MessageUtil.error(WeaverMessages.format(WeaverMessages.ANNOTATIONS_NEED_JAVA5), getSourceLocation())); return this; } if (resolved) { return this; } this.typePattern = typePattern.resolveBindings(scope, bindings, false, false); resolved = true; if (typePattern instanceof ExactTypePattern) { ExactTypePattern et = (ExactTypePattern) typePattern; if (!et.getExactType().resolve(scope.getWorld()).isAnnotation()) { IMessage m = MessageUtil.error( WeaverMessages.format(WeaverMessages.REFERENCE_TO_NON_ANNOTATION_TYPE, et.getExactType().getName()), getSourceLocation()); scope.getWorld().getMessageHandler().handleMessage(m); resolved = false; } ResolvedType annotationType = et.getExactType().resolve(scope.getWorld()); resolveAnnotationValues(annotationType, scope); ExactAnnotationTypePattern eatp = new ExactAnnotationTypePattern(annotationType, annotationValues);
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
eatp.copyLocationFrom(this); if (isForParameterAnnotationMatch()) { eatp.setForParameterAnnotationMatch(); } return eatp; } else { return this; } } @Override public AnnotationTypePattern parameterizeWith(Map typeVariableMap, World w) { WildAnnotationTypePattern ret = new WildAnnotationTypePattern(typePattern.parameterizeWith(typeVariableMap, w)); ret.copyLocationFrom(this); ret.resolved = resolved; return ret; } private static final byte VERSION = 1; @Override public void write(CompressingDataOutputStream s) throws IOException { s.writeByte(AnnotationTypePattern.WILD); s.writeByte(VERSION); typePattern.write(s); writeLocation(s); s.writeBoolean(isForParameterAnnotationMatch()); if (annotationValues == null) { s.writeInt(0); } else { s.writeInt(annotationValues.size()); Set<String> key = annotationValues.keySet();
391,384
Bug 391384 WildAnnotationTypePattern.java:231
OK, I get that this is not supported (and what I *want* here is matching on the existence of the supplied header *among* the headers in the String[]). A feature request might be in order, but a syntax for specifying how you want to match the array would be needed.... The bug that I'm reporting is that trying to *save* this program gets an error that pops up a dialog. This should just become another error marker. It might the compiler that has to change what it throws, but in the end it's the Eclipse IDE that ends up breaking from a user standpoint. (RequestMapping.headers() is of type String[]). public aspect Fail { pointcut testable(): execution(public * @RequestMapping(headers="x-test=test") com.example..*(..)); } java.lang.RuntimeException at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveAnnotationValues(WildAnnotationTypePattern.java:231) at org.aspectj.weaver.patterns.WildAnnotationTypePattern.resolveBindings(WildAnnotationTypePattern.java:325) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:657) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:81) at org.a ... n(Worker.java:53) Compile error: RuntimeException thrown: Compiler limitation: annotation value support not implemented for type java.lang.String[]
resolved fixed
edb41e3
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
"2013-02-05T19:14:40Z"
"2012-10-09T05:20:00Z"
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
for (Iterator<String> keys = key.iterator(); keys.hasNext();) { String k = keys.next(); s.writeUTF(k); s.writeUTF(annotationValues.get(k)); } } } public static AnnotationTypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException { WildAnnotationTypePattern ret; byte version = s.readByte(); if (version > VERSION) { throw new BCException("ExactAnnotationTypePattern was written by a newer version of AspectJ"); } TypePattern t = TypePattern.read(s, context); ret = new WildAnnotationTypePattern(t); ret.readLocation(context, s); if (s.getMajorVersion() >= WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ160) { if (s.readBoolean()) { ret.setForParameterAnnotationMatch(); } } if (s.getMajorVersion() >= WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ160M2) { int annotationValueCount = s.readInt(); if (annotationValueCount > 0) { Map<String, String> aValues = new HashMap<String, String>(); for (int i = 0; i < annotationValueCount; i++) { String key = s.readUTF(); String val = s.readUTF(); aValues.put(key, val); }