issue_id
int64 2.04k
425k
| title
stringlengths 9
251
| body
stringlengths 4
32.8k
⌀ | status
stringclasses 6
values | after_fix_sha
stringlengths 7
7
| project_name
stringclasses 6
values | repo_url
stringclasses 6
values | repo_name
stringclasses 6
values | language
stringclasses 1
value | issue_url
null | before_fix_sha
null | pull_url
null | commit_datetime
timestamp[us, tz=UTC] | report_datetime
timestamp[us, tz=UTC] | updated_file
stringlengths 23
187
| chunk_content
stringlengths 1
22k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
getResolvedTypeX().getWorld(), AjAttribute.WeaverVersionInfo.UNKNOWN);
List pointcuts = new ArrayList();
typeMungers = new ArrayList();
declares = new ArrayList();
processAttributes(l, pointcuts, false);
l = AtAjAttributes.readAj5ClassAttributes(((BcelWorld) getResolvedTypeX().getWorld()).getModelAsAsmManager(), javaClass,
getResolvedTypeX(), getResolvedTypeX().getSourceContext(), msgHandler, isCodeStyleAspect);
AjAttribute.Aspect deferredAspectAttribute = processAttributes(l, pointcuts, true);
if (pointcuts.size() == 0) {
this.pointcuts = ResolvedPointcutDefinition.NO_POINTCUTS;
} else {
this.pointcuts = (ResolvedPointcutDefinition[]) pointcuts.toArray(new ResolvedPointcutDefinition[pointcuts.size()]);
}
resolveAnnotationDeclares(l);
if (deferredAspectAttribute != null) {
perClause = deferredAspectAttribute.reifyFromAtAspectJ(this.getResolvedTypeX());
}
if (isAspect() && !Modifier.isAbstract(getModifiers()) && isGeneric()) {
msgHandler.handleMessage(MessageUtil.error("The generic aspect '" + getResolvedTypeX().getName()
+ "' must be declared abstract", getResolvedTypeX().getSourceLocation()));
}
}
private AjAttribute.Aspect processAttributes(List attributeList, List pointcuts, boolean fromAnnotations) {
AjAttribute.Aspect deferredAspectAttribute = null;
for (Iterator iter = attributeList.iterator(); iter.hasNext();) {
AjAttribute a = (AjAttribute) iter.next();
if (a instanceof AjAttribute.Aspect) {
if (fromAnnotations) {
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
deferredAspectAttribute = (AjAttribute.Aspect) a;
} else {
perClause = ((AjAttribute.Aspect) a).reify(this.getResolvedTypeX());
isCodeStyleAspect = true;
}
} else if (a instanceof AjAttribute.PointcutDeclarationAttribute) {
pointcuts.add(((AjAttribute.PointcutDeclarationAttribute) a).reify());
} else if (a instanceof AjAttribute.WeaverState) {
weaverState = ((AjAttribute.WeaverState) a).reify();
} else if (a instanceof AjAttribute.TypeMunger) {
typeMungers.add(((AjAttribute.TypeMunger) a).reify(getResolvedTypeX().getWorld(), getResolvedTypeX()));
} else if (a instanceof AjAttribute.DeclareAttribute) {
declares.add(((AjAttribute.DeclareAttribute) a).getDeclare());
} else if (a instanceof AjAttribute.PrivilegedAttribute) {
privilegedAccess = ((AjAttribute.PrivilegedAttribute) a).getAccessedMembers();
} else if (a instanceof AjAttribute.SourceContextAttribute) {
if (getResolvedTypeX().getSourceContext() instanceof SourceContextImpl) {
AjAttribute.SourceContextAttribute sca = (AjAttribute.SourceContextAttribute) a;
((SourceContextImpl) getResolvedTypeX().getSourceContext()).configureFromAttribute(sca.getSourceFileName(), sca
.getLineBreaks());
setSourcefilename(sca.getSourceFileName());
}
} else if (a instanceof AjAttribute.WeaverVersionInfo) {
wvInfo = (AjAttribute.WeaverVersionInfo) a;
} else {
throw new BCException("bad attribute " + a);
}
}
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
return deferredAspectAttribute;
}
/**
* Extra processing step needed because declares that come from annotations are not pre-resolved. We can't do the resolution
* until *after* the pointcuts have been resolved.
*
* @param attributeList
*/
private void resolveAnnotationDeclares(List attributeList) {
FormalBinding[] bindings = new org.aspectj.weaver.patterns.FormalBinding[0];
IScope bindingScope = new BindingScope(getResolvedTypeX(), getResolvedTypeX().getSourceContext(), bindings);
for (Iterator iter = attributeList.iterator(); iter.hasNext();) {
AjAttribute a = (AjAttribute) iter.next();
if (a instanceof AjAttribute.DeclareAttribute) {
Declare decl = (((AjAttribute.DeclareAttribute) a).getDeclare());
if (decl instanceof DeclareErrorOrWarning) {
decl.resolve(bindingScope);
} else if (decl instanceof DeclarePrecedence) {
((DeclarePrecedence) decl).setScopeForResolution(bindingScope);
}
}
}
}
public PerClause getPerClause() {
ensureAspectJAttributesUnpacked();
return perClause;
}
public JavaClass getJavaClass() {
return javaClass;
}
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
public void resetState() {
if (javaClass == null) {
throw new BCException("can't weave evicted type");
}
bitflag = 0x0000;
this.annotationTypes = null;
this.annotations = null;
this.interfaceSignatures = null;
this.superclassSignature = null;
this.superclassName = null;
this.fields = null;
this.methods = null;
this.pointcuts = null;
this.perClause = null;
this.weaverState = null;
this.lazyClassGen = null;
hasBeenWoven = false;
isObject = (javaClass.getSuperclassNameIndex() == 0);
isAnnotationStyleAspect = false;
ensureAspectJAttributesUnpacked();
}
public void finishedWith() {
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
}
public WeaverStateInfo getWeaverState() {
return weaverState;
}
void setWeaverState(WeaverStateInfo weaverState) {
this.weaverState = weaverState;
}
public void printWackyStuff(PrintStream out) {
if (typeMungers.size() > 0)
out.println(" TypeMungers: " + typeMungers);
if (declares.size() > 0)
out.println(" declares: " + declares);
}
/**
* Return the lazyClassGen associated with this type. For aspect types, this value will be cached, since it is used to inline
* advice. For non-aspect types, this lazyClassGen is always newly constructed.
*/
public LazyClassGen getLazyClassGen() {
LazyClassGen ret = lazyClassGen;
if (ret == null) {
ret = new LazyClassGen(this);
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
if (isAspect()) {
lazyClassGen = ret;
}
}
return ret;
}
public boolean isSynthetic() {
return getResolvedTypeX().isSynthetic();
}
public AjAttribute.WeaverVersionInfo getWeaverVersionAttribute() {
return wvInfo;
}
public ResolvedType[] getAnnotationTypes() {
ensureAnnotationsUnpacked();
return annotationTypes;
}
public AnnotationAJ[] getAnnotations() {
ensureAnnotationsUnpacked();
return annotations;
}
public boolean hasAnnotation(UnresolvedType ofType) {
ensureAnnotationsUnpacked();
for (int i = 0; i < annotationTypes.length; i++) {
ResolvedType ax = annotationTypes[i];
if (ax.equals(ofType))
return true;
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
}
return false;
}
public boolean isAnnotationWithRuntimeRetention() {
return (getRetentionPolicy() == null ? false : getRetentionPolicy().equals("RUNTIME"));
}
public String getRetentionPolicy() {
if ((bitflag & DISCOVERED_ANNOTATION_RETENTION_POLICY) == 0) {
bitflag |= DISCOVERED_ANNOTATION_RETENTION_POLICY;
retentionPolicy = null;
if (isAnnotation()) {
ensureAnnotationsUnpacked();
for (int i = annotations.length - 1; i >= 0; i--) {
AnnotationAJ ax = annotations[i];
if (ax.getTypeName().equals(UnresolvedType.AT_RETENTION.getName())) {
List values = ((BcelAnnotation) ax).getBcelAnnotation().getValues();
for (Iterator it = values.iterator(); it.hasNext();) {
ElementNameValuePairGen element = (ElementNameValuePairGen) it.next();
EnumElementValueGen v = (EnumElementValueGen) element.getValue();
retentionPolicy = v.getEnumValueString();
return retentionPolicy;
}
}
}
}
}
return retentionPolicy;
}
public boolean canAnnotationTargetType() {
AnnotationTargetKind[] targetKinds = getAnnotationTargetKinds();
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
if (targetKinds == null)
return true;
for (int i = 0; i < targetKinds.length; i++) {
if (targetKinds[i].equals(AnnotationTargetKind.TYPE)) {
return true;
}
}
return false;
}
public AnnotationTargetKind[] getAnnotationTargetKinds() {
if ((bitflag & DISCOVERED_ANNOTATION_TARGET_KINDS) != 0)
return annotationTargetKinds;
bitflag |= DISCOVERED_ANNOTATION_TARGET_KINDS;
annotationTargetKinds = null;
List targetKinds = new ArrayList();
if (isAnnotation()) {
AnnotationGen[] annotationsOnThisType = javaClass.getAnnotations();
for (int i = 0; i < annotationsOnThisType.length; i++) {
AnnotationGen a = annotationsOnThisType[i];
if (a.getTypeName().equals(UnresolvedType.AT_TARGET.getName())) {
ArrayElementValueGen arrayValue = (ArrayElementValueGen) ((ElementNameValuePairGen) a.getValues().get(0))
.getValue();
ElementValueGen[] evs = arrayValue.getElementValuesArray();
if (evs != null) {
for (int j = 0; j < evs.length; j++) {
String targetKind = ((EnumElementValueGen) evs[j]).getEnumValueString();
if (targetKind.equals("ANNOTATION_TYPE")) {
targetKinds.add(AnnotationTargetKind.ANNOTATION_TYPE);
} else if (targetKind.equals("CONSTRUCTOR")) {
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
targetKinds.add(AnnotationTargetKind.CONSTRUCTOR);
} else if (targetKind.equals("FIELD")) {
targetKinds.add(AnnotationTargetKind.FIELD);
} else if (targetKind.equals("LOCAL_VARIABLE")) {
targetKinds.add(AnnotationTargetKind.LOCAL_VARIABLE);
} else if (targetKind.equals("METHOD")) {
targetKinds.add(AnnotationTargetKind.METHOD);
} else if (targetKind.equals("PACKAGE")) {
targetKinds.add(AnnotationTargetKind.PACKAGE);
} else if (targetKind.equals("PARAMETER")) {
targetKinds.add(AnnotationTargetKind.PARAMETER);
} else if (targetKind.equals("TYPE")) {
targetKinds.add(AnnotationTargetKind.TYPE);
}
}
}
}
}
if (!targetKinds.isEmpty()) {
annotationTargetKinds = new AnnotationTargetKind[targetKinds.size()];
return (AnnotationTargetKind[]) targetKinds.toArray(annotationTargetKinds);
}
}
return annotationTargetKinds;
}
private void ensureAnnotationsUnpacked() {
if (annotationTypes == null) {
AnnotationGen annos[] = javaClass.getAnnotations();
if (annos == null || annos.length == 0) {
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
annotationTypes = ResolvedType.NONE;
annotations = AnnotationAJ.EMPTY_ARRAY;
} else {
World w = getResolvedTypeX().getWorld();
annotationTypes = new ResolvedType[annos.length];
annotations = new AnnotationAJ[annos.length];
for (int i = 0; i < annos.length; i++) {
AnnotationGen annotation = annos[i];
annotationTypes[i] = w.resolve(UnresolvedType.forSignature(annotation.getTypeSignature()));
annotations[i] = new BcelAnnotation(annotation, w);
}
}
}
}
public String getDeclaredGenericSignature() {
ensureGenericInfoProcessed();
return declaredSignature;
}
private void ensureGenericSignatureUnpacked() {
if ((bitflag & UNPACKED_GENERIC_SIGNATURE) != 0)
return;
bitflag |= UNPACKED_GENERIC_SIGNATURE;
if (!getResolvedTypeX().getWorld().isInJava5Mode())
return;
GenericSignature.ClassSignature cSig = getGenericClassTypeSignature();
if (cSig != null) {
formalsForResolution = cSig.formalTypeParameters;
if (isNested()) {
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
GenericSignature.FormalTypeParameter[] extraFormals = getFormalTypeParametersFromOuterClass();
if (extraFormals.length > 0) {
List allFormals = new ArrayList();
for (int i = 0; i < formalsForResolution.length; i++) {
allFormals.add(formalsForResolution[i]);
}
for (int i = 0; i < extraFormals.length; i++) {
allFormals.add(extraFormals[i]);
}
formalsForResolution = new GenericSignature.FormalTypeParameter[allFormals.size()];
allFormals.toArray(formalsForResolution);
}
}
GenericSignature.ClassTypeSignature superSig = cSig.superclassSignature;
try {
ResolvedType rt = BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(superSig, formalsForResolution,
getResolvedTypeX().getWorld());
this.superclassSignature = rt.getSignature();
this.superclassName = rt.getName();
} catch (GenericSignatureFormatException e) {
throw new IllegalStateException("While determining the generic superclass of " + this.className
+ " with generic signature " + getDeclaredGenericSignature() + " the following error was detected: "
+ e.getMessage());
}
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
if (cSig.superInterfaceSignatures.length == 0) {
this.interfaceSignatures = NO_INTERFACE_SIGS;
} else {
this.interfaceSignatures = new String[cSig.superInterfaceSignatures.length];
for (int i = 0; i < cSig.superInterfaceSignatures.length; i++) {
try {
this.interfaceSignatures[i] = BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
cSig.superInterfaceSignatures[i], formalsForResolution, getResolvedTypeX().getWorld())
.getSignature();
} catch (GenericSignatureFormatException e) {
throw new IllegalStateException("While determing the generic superinterfaces of " + this.className
+ " with generic signature " + getDeclaredGenericSignature()
+ " the following error was detected: " + e.getMessage());
}
}
}
}
if (isGeneric()) {
ReferenceType genericType = (ReferenceType) this.resolvedTypeX.getGenericType();
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
genericType.setStartPos(this.resolvedTypeX.getStartPos());
this.resolvedTypeX = genericType;
}
}
public GenericSignature.FormalTypeParameter[] getAllFormals() {
ensureGenericSignatureUnpacked();
if (formalsForResolution == null) {
return new GenericSignature.FormalTypeParameter[0];
} else {
return formalsForResolution;
}
}
public ResolvedType getOuterClass() {
if (!isNested())
throw new IllegalStateException("Can't get the outer class of a non-nested type");
int lastDollar = className.lastIndexOf('$');
String superClassName = className.substring(0, lastDollar);
UnresolvedType outer = UnresolvedType.forName(superClassName);
return outer.resolve(getResolvedTypeX().getWorld());
}
private void ensureGenericInfoProcessed() {
if ((bitflag & DISCOVERED_DECLARED_SIGNATURE) != 0)
return;
bitflag |= DISCOVERED_DECLARED_SIGNATURE;
Signature sigAttr = AttributeUtils.getSignatureAttribute(javaClass.getAttributes());
declaredSignature = (sigAttr == null ? null : sigAttr.getSignature());
if (declaredSignature != null)
isGenericType = (declaredSignature.charAt(0) == '<');
}
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
public boolean isGeneric() {
ensureGenericInfoProcessed();
return isGenericType;
}
public String toString() {
return (javaClass == null ? "BcelObjectType" : "BcelObjectTypeFor:" + className);
}
public void evictWeavingState() {
if (getResolvedTypeX().getWorld().couldIncrementalCompileFollow())
return;
if (javaClass != null) {
ensureAnnotationsUnpacked();
ensureGenericInfoProcessed();
getDeclaredInterfaces();
getDeclaredFields();
getDeclaredMethods();
if (getResolvedTypeX().getWorld().isXnoInline())
lazyClassGen = null;
if (weaverState != null) {
|
279,120 |
Bug 279120 NPE determining annotation target kind during weaving
|
reported on the list: Hi, I am using aspectj LTW (aspectjweaver-1.6.1) for weaving an aspect available in another jar within my web application code. While building the jar which contains the aspect, using maven, I have JUnits which run without any problems using LTW. My aspect code looks as below @Around("execution (@com.arisglobal.aglite.annotations.OperationTrail public * *(..)) && this(executor)") public Object auditOperation(ProceedingJoinPoint thisJoinPoint, Object executor) { ... ... aspect code ... } However when I deploy the application in tomcat (with javaagent:aspectjweaver-1.6.1.jar option), I get a NPE which I have pasted below. Jun 4, 2009 12:06:18 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: com/arisglobal/aglite/services/actiontrail/ActionTrailAspect java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.getAnnotationTargetKinds(BcelO bjectType.java:612) at org.aspectj.weaver.ReferenceType.getAnnotationTargetKinds(ReferenceTy pe.java:265) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:112) at org.aspectj.weaver.patterns.SignaturePattern.checkForIncorrectTargetK ind(SignaturePattern.java:94) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(Signatur ePattern.java:87) at org.aspectj.weaver.patterns.KindedPointcut.resolveBindings(KindedPoin tcut.java:262) at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.j ava:75) at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:196) at org.aspectj.weaver.bcel.AtAjAttributes.handleAroundAnnotation(AtAjAtt ributes.java:1308) at org.aspectj.weaver.bcel.AtAjAttributes.readAj5MethodAttributes(AtAjAt tributes.java:403) at org.aspectj.weaver.bcel.BcelMethod.unpackAjAttributes(BcelMethod.java :189) at org.aspectj.weaver.bcel.BcelMethod.<init>(BcelMethod.java:96) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredMethods(BcelObjectT ype.java:264) at org.aspectj.weaver.bcel.LazyClassGen.<init>(LazyClassGen.java:303) at org.aspectj.weaver.bcel.BcelObjectType.getLazyClassGen(BcelObjectType .java:524) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1728) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1 696) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:145 8) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1244) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor. java:423) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.jav a:286) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:95) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C lassPreProcessorAgentAdapter.java:52) at sun.instrument.TransformerManager.transform(TransformerManager.java:1 22) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java :155) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) I also tried using aspectjweaver-1.6.4 version however got the same error.
|
resolved fixed
|
3417cbe
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-04T15:43:11Z | 2009-06-04T15:40:00Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
weaverState.setReweavable(false);
weaverState.setUnwovenClassFileData(null);
}
for (int i = methods.length - 1; i >= 0; i--)
methods[i].evictWeavingState();
for (int i = fields.length - 1; i >= 0; i--)
fields[i].evictWeavingState();
javaClass = null;
}
}
public void weavingCompleted() {
hasBeenWoven = true;
if (getResolvedTypeX().getWorld().isRunMinimalMemory())
evictWeavingState();
if (getSourceContext() != null && !getResolvedTypeX().isAspect())
getSourceContext().tidy();
}
public boolean hasBeenWoven() {
return hasBeenWoven;
}
public boolean copySourceContext() {
return false;
}
}
|
280,783 |
Bug 280783 JavaDocRunner fails on System.setSecurityManager in Netbeans
| null |
resolved fixed
|
59d5c3b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-18T18:37:30Z | 2009-06-18T15:46:40Z |
ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java
|
/* *******************************************************************
* Copyright (c) 1999-2001 Xerox Corporation,
* 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Xerox/PARC initial implementation
* Mik Kersten port to AspectJ 1.1+ code base
* ******************************************************************/
package org.aspectj.tools.ajdoc;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* @author Mik Kersten
*/
class JavadocRunner {
|
280,783 |
Bug 280783 JavaDocRunner fails on System.setSecurityManager in Netbeans
| null |
resolved fixed
|
59d5c3b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-18T18:37:30Z | 2009-06-18T15:46:40Z |
ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java
|
static boolean has14ToolsAvailable() {
try {
Class jdMainClass = com.sun.tools.javadoc.Main.class;
Class[] paramTypes = new Class[] {String[].class};
jdMainClass.getMethod("execute", paramTypes);
} catch (NoClassDefFoundError e) {
return false;
} catch (UnsupportedClassVersionError e) {
return false;
} catch (NoSuchMethodException e) {
|
280,783 |
Bug 280783 JavaDocRunner fails on System.setSecurityManager in Netbeans
| null |
resolved fixed
|
59d5c3b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-18T18:37:30Z | 2009-06-18T15:46:40Z |
ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java
|
return false;
}
return true;
}
static void callJavadoc( String[] javadocargs ){
final SecurityManager defaultSecurityManager = System.getSecurityManager();
System.setSecurityManager( new SecurityManager() {
public void checkExit(int status) {
if (status == 0) {
throw new SecurityException();
}
else {
System.setSecurityManager(defaultSecurityManager);
System.exit(0);
throw new SecurityException();
}
}
public void checkPermission( java.security.Permission permission ) {
if ( defaultSecurityManager != null )
defaultSecurityManager.checkPermission( permission );
}
public void checkPermission( java.security.Permission permission,
Object context ) {
if ( defaultSecurityManager != null )
defaultSecurityManager.checkPermission( permission, context );
}
} );
try {
|
280,783 |
Bug 280783 JavaDocRunner fails on System.setSecurityManager in Netbeans
| null |
resolved fixed
|
59d5c3b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-06-18T18:37:30Z | 2009-06-18T15:46:40Z |
ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java
|
Class jdMainClass = com.sun.tools.javadoc.Main.class;
Method executeMethod = null;
try {
Class[] paramTypes = new Class[] {String[].class};
executeMethod = jdMainClass.getMethod("execute", paramTypes);
} catch (NoSuchMethodException e) {
com.sun.tools.javadoc.Main.main(javadocargs);
}
try {
executeMethod.invoke(null, new Object[] {javadocargs});
} catch (IllegalArgumentException e1) {
throw new RuntimeException("Failed to invoke javadoc");
} catch (IllegalAccessException e1) {
throw new RuntimeException("Failed to invoke javadoc");
} catch (InvocationTargetException e1) {
throw new RuntimeException("Failed to invoke javadoc");
}
}
catch ( SecurityException se ) {
}
System.setSecurityManager( defaultSecurityManager );
}
}
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
* 2005 Contributors
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http:www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* PARC initial implementation
* Adrian Colyer, Andy Clement, overhaul for generics
* ******************************************************************/
package org.aspectj.weaver;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.SoftReference;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.WeakHashMap;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.ISourceLocation;
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
import org.aspectj.bridge.Message;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.bridge.IMessage.Kind;
import org.aspectj.bridge.context.PinpointingMessageHandler;
import org.aspectj.util.IStructureModel;
import org.aspectj.weaver.UnresolvedType.TypeKind;
import org.aspectj.weaver.patterns.DeclarePrecedence;
import org.aspectj.weaver.patterns.Pointcut;
import org.aspectj.weaver.patterns.TypePattern;
import org.aspectj.weaver.tools.PointcutDesignatorHandler;
import org.aspectj.weaver.tools.Trace;
import org.aspectj.weaver.tools.TraceFactory;
/**
* A World is a collection of known types and crosscutting members.
*/
public abstract class World implements Dump.INode {
private IMessageHandler messageHandler = IMessageHandler.SYSTEM_ERR;
/**
* handler for cross-reference information produced during the weaving process
*/
private ICrossReferenceHandler xrefHandler = null;
/**
* Currently 'active' scope in which to lookup (resolve) typevariable references
*/
private TypeVariableDeclaringElement typeVariableLookupScope;
protected TypeMap typeMap = new TypeMap(this);
private Set pointcutDesignators;
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
public static boolean createInjarHierarchy = true;
private final AspectPrecedenceCalculator precedenceCalculator;
private final CrosscuttingMembersSet crosscuttingMembersSet = new CrosscuttingMembersSet(this);
private IStructureModel model = null;
private Lint lint = new Lint(this);
private boolean XnoInline;
private boolean XlazyTjp;
private boolean XhasMember = false;
/**
* Xpinpoint controls whether we put out developer info showing the source of messages
*/
private boolean Xpinpoint = false;
private boolean behaveInJava5Way = false;
private boolean incrementalCompileCouldFollow = false;
private String targetAspectjRuntimeLevel = Constants.RUNTIME_LEVEL_DEFAULT;
private boolean optionalJoinpoint_ArrayConstruction = false;
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
private boolean optionalJoinpoint_Synchronization = false;
private boolean addSerialVerUID = false;
private Properties extraConfiguration = null;
private boolean checkedAdvancedConfiguration = false;
private boolean synchronizationPointcutsInUse = false;
private boolean runMinimalMemory = false;
private boolean shouldPipelineCompilation = true;
private boolean shouldGenerateStackMaps = false;
protected boolean bcelRepositoryCaching = xsetBCEL_REPOSITORY_CACHING_DEFAULT.equalsIgnoreCase("true");
private boolean fastMethodPacking = false;
private boolean completeBinaryTypes = false;
public boolean forDEBUG_structuralChangesCode = false;
public boolean forDEBUG_bridgingCode = false;
private static Trace trace = TraceFactory.getTraceFactory().getTrace(World.class);
private long errorThreshold;
private long warningThreshold;
/**
* A list of RuntimeExceptions containing full stack information for every type we couldn't find.
*/
private List dumpState_cantFindTypeExceptions = null;
/**
* Play God. On the first day, God created the primitive types and put them in the type map.
*/
protected World() {
super();
if (trace.isTraceEnabled())
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
trace.enter("<init>", this);
Dump.registerNode(this.getClass(), this);
typeMap.put("B", ResolvedType.BYTE);
typeMap.put("S", ResolvedType.SHORT);
typeMap.put("I", ResolvedType.INT);
typeMap.put("J", ResolvedType.LONG);
typeMap.put("F", ResolvedType.FLOAT);
typeMap.put("D", ResolvedType.DOUBLE);
typeMap.put("C", ResolvedType.CHAR);
typeMap.put("Z", ResolvedType.BOOLEAN);
typeMap.put("V", ResolvedType.VOID);
precedenceCalculator = new AspectPrecedenceCalculator(this);
if (trace.isTraceEnabled())
trace.exit("<init>");
}
/**
* Dump processing when a fatal error occurs
*/
public void accept(Dump.IVisitor visitor) {
visitor.visitObject("Shadow mungers:");
visitor.visitList(crosscuttingMembersSet.getShadowMungers());
visitor.visitObject("Type mungers:");
visitor.visitList(crosscuttingMembersSet.getTypeMungers());
visitor.visitObject("Late Type mungers:");
visitor.visitList(crosscuttingMembersSet.getLateTypeMungers());
if (dumpState_cantFindTypeExceptions != null) {
visitor.visitObject("Cant find type problems:");
visitor.visitList(dumpState_cantFindTypeExceptions);
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
dumpState_cantFindTypeExceptions = null;
}
}
/**
* Resolve a type that we require to be present in the world
*/
public ResolvedType resolve(UnresolvedType ty) {
return resolve(ty, false);
}
/**
* Attempt to resolve a type - the source location gives you some context in which resolution is taking place. In the case of an
* error where we can't find the type - we can then at least report why (source location) we were trying to resolve it.
*/
public ResolvedType resolve(UnresolvedType ty, ISourceLocation isl) {
ResolvedType ret = resolve(ty, true);
if (ResolvedType.isMissing(ty)) {
getLint().cantFindType.signal(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE, ty.getName()), isl);
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
}
return ret;
}
/**
* Convenience method for resolving an array of unresolved types in one hit. Useful for e.g. resolving type parameters in
* signatures.
*/
public ResolvedType[] resolve(UnresolvedType[] types) {
if (types == null)
return new ResolvedType[0];
ResolvedType[] ret = new ResolvedType[types.length];
for (int i = 0; i < types.length; i++) {
ret[i] = resolve(types[i]);
}
return ret;
}
/**
* Resolve a type. This the hub of type resolution. The resolved type is added to the type map by signature.
*/
public ResolvedType resolve(UnresolvedType ty, boolean allowMissing) {
if (ty instanceof ResolvedType) {
ResolvedType rty = (ResolvedType) ty;
rty = resolve(rty);
return rty;
}
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
if (ty.isTypeVariableReference()) {
return ty.resolve(this);
}
String signature = ty.getSignature();
ResolvedType ret = typeMap.get(signature);
if (ret != null) {
ret.world = this;
return ret;
} else if (signature.equals("?") || signature.equals("*")) {
ResolvedType something = new BoundedReferenceType("*", "Ljava/lang/Object", this);
typeMap.put("?", something);
return something;
}
if (ty.isArray()) {
ResolvedType componentType = resolve(ty.getComponentType(), allowMissing);
ret = new ArrayReferenceType(signature, "[" + componentType.getErasureSignature(), this, componentType);
} else {
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
ret = resolveToReferenceType(ty, allowMissing);
if (!allowMissing && ret.isMissing()) {
ret = handleRequiredMissingTypeDuringResolution(ty);
}
if (completeBinaryTypes) {
completeBinaryType(ret);
}
}
if (typeMap.get(signature) == null && !ret.isMissing()) {
typeMap.put(signature, ret);
}
return ret;
}
/**
* Called when a type is resolved - enables its type hierarchy to be finished off before we proceed
*/
protected void completeBinaryType(ResolvedType ret) {
}
/**
* Return true if the classloader relating to this world is definetly the one that will define the specified class. Return false
* otherwise or we don't know for certain.
*/
public boolean isLocallyDefined(String classname) {
return false;
}
/**
* We tried to resolve a type and couldn't find it...
*/
private ResolvedType handleRequiredMissingTypeDuringResolution(UnresolvedType ty) {
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
if (dumpState_cantFindTypeExceptions == null) {
dumpState_cantFindTypeExceptions = new ArrayList();
}
if (dumpState_cantFindTypeExceptions.size() < 100) {
dumpState_cantFindTypeExceptions.add(new RuntimeException("Can't find type " + ty.getName()));
}
return new MissingResolvedTypeWithKnownSignature(ty.getSignature(), this);
}
/**
* Some TypeFactory operations create resolved types directly, but these won't be in the typeMap - this resolution process puts
* them there. Resolved types are also told their world which is needed for the special autoboxing resolved types.
*/
public ResolvedType resolve(ResolvedType ty) {
if (ty.isTypeVariableReference())
return ty;
ResolvedType resolved = typeMap.get(ty.getSignature());
if (resolved == null) {
typeMap.put(ty.getSignature(), ty);
resolved = ty;
}
resolved.world = this;
return resolved;
}
/**
* Convenience method for finding a type by name and resolving it in one step.
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
*/
public ResolvedType resolve(String name) {
ResolvedType ret = resolve(UnresolvedType.forName(name));
return ret;
}
public ResolvedType resolve(String name, boolean allowMissing) {
return resolve(UnresolvedType.forName(name), allowMissing);
}
/**
* Resolve to a ReferenceType - simple, raw, parameterized, or generic. Raw, parameterized, and generic versions of a type share
* a delegate.
*/
private final ResolvedType resolveToReferenceType(UnresolvedType ty, boolean allowMissing) {
if (ty.isParameterizedType()) {
ResolvedType rt = resolveGenericTypeFor(ty, allowMissing);
if (rt.isMissing())
return rt;
ReferenceType genericType = (ReferenceType) rt;
ReferenceType parameterizedType = TypeFactory.createParameterizedType(genericType, ty.typeParameters, this);
return parameterizedType;
} else if (ty.isGenericType()) {
ReferenceType genericType = (ReferenceType) resolveGenericTypeFor(ty, false);
return genericType;
} else if (ty.isGenericWildcard()) {
return resolveGenericWildcardFor((WildcardedUnresolvedType) ty);
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
} else {
String erasedSignature = ty.getErasureSignature();
ReferenceType simpleOrRawType = new ReferenceType(erasedSignature, this);
if (ty.needsModifiableDelegate())
simpleOrRawType.setNeedsModifiableDelegate(true);
ReferenceTypeDelegate delegate = resolveDelegate(simpleOrRawType);
if (delegate == null)
return new MissingResolvedTypeWithKnownSignature(ty.getSignature(), erasedSignature, this);
if (delegate.isGeneric() && behaveInJava5Way) {
simpleOrRawType.typeKind = TypeKind.RAW;
ReferenceType genericType = makeGenericTypeFrom(delegate, simpleOrRawType);
simpleOrRawType.setDelegate(delegate);
genericType.setDelegate(delegate);
simpleOrRawType.setGenericType(genericType);
return simpleOrRawType;
} else {
simpleOrRawType.setDelegate(delegate);
return simpleOrRawType;
}
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
}
}
/**
* Attempt to resolve a type that should be a generic type.
*/
public ResolvedType resolveGenericTypeFor(UnresolvedType anUnresolvedType, boolean allowMissing) {
String rawSignature = anUnresolvedType.getRawType().getSignature();
ResolvedType rawType = typeMap.get(rawSignature);
if (rawType == null) {
rawType = resolve(UnresolvedType.forSignature(rawSignature), allowMissing);
typeMap.put(rawSignature, rawType);
}
if (rawType.isMissing())
return rawType;
ResolvedType genericType = rawType.getGenericType();
if (rawType.isSimpleType() && (anUnresolvedType.typeParameters == null || anUnresolvedType.typeParameters.length == 0)) {
rawType.world = this;
return rawType;
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
}
if (genericType != null) {
genericType.world = this;
return genericType;
} else {
ReferenceTypeDelegate delegate = resolveDelegate((ReferenceType) rawType);
ReferenceType genericRefType = makeGenericTypeFrom(delegate, ((ReferenceType) rawType));
((ReferenceType) rawType).setGenericType(genericRefType);
genericRefType.setDelegate(delegate);
((ReferenceType) rawType).setDelegate(delegate);
return genericRefType;
}
}
private ReferenceType makeGenericTypeFrom(ReferenceTypeDelegate delegate, ReferenceType rawType) {
String genericSig = delegate.getDeclaredGenericSignature();
if (genericSig != null) {
return new ReferenceType(UnresolvedType.forGenericTypeSignature(rawType.getSignature(), delegate
.getDeclaredGenericSignature()), this);
} else {
return new ReferenceType(UnresolvedType.forGenericTypeVariables(rawType.getSignature(), delegate.getTypeVariables()),
this);
}
}
/**
* Go from an unresolved generic wildcard (represented by UnresolvedType) to a resolved version (BoundedReferenceType).
*/
private ReferenceType resolveGenericWildcardFor(WildcardedUnresolvedType aType) {
BoundedReferenceType ret = null;
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
if (aType.isExtends()) {
ReferenceType upperBound = (ReferenceType) resolve(aType.getUpperBound());
ret = new BoundedReferenceType(upperBound, true, this);
} else if (aType.isSuper()) {
ReferenceType lowerBound = (ReferenceType) resolve(aType.getLowerBound());
ret = new BoundedReferenceType(lowerBound, false, this);
} else {
ret = new BoundedReferenceType("*", "Ljava/lang/Object", this);
}
return ret;
}
/**
* Find the ReferenceTypeDelegate behind this reference type so that it can fulfill its contract.
*/
protected abstract ReferenceTypeDelegate resolveDelegate(ReferenceType ty);
/**
* Special resolution for "core" types like OBJECT. These are resolved just like any other type, but if they are not found it is
* more serious and we issue an error message immediately.
*/
public ResolvedType getCoreType(UnresolvedType tx) {
ResolvedType coreTy = resolve(tx, true);
if (coreTy.isMissing()) {
MessageUtil.error(messageHandler, WeaverMessages.format(WeaverMessages.CANT_FIND_CORE_TYPE, tx.getName()));
}
return coreTy;
}
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
/**
* Lookup a type by signature, if not found then build one and put it in the map.
*/
public ReferenceType lookupOrCreateName(UnresolvedType ty) {
String signature = ty.getSignature();
ReferenceType ret = lookupBySignature(signature);
if (ret == null) {
ret = ReferenceType.fromTypeX(ty, this);
typeMap.put(signature, ret);
}
return ret;
}
/**
* Lookup a reference type in the world by its signature. Returns null if not found.
*/
public ReferenceType lookupBySignature(String signature) {
return (ReferenceType) typeMap.get(signature);
}
/**
* Member resolution is achieved by resolving the declaring type and then looking up the member in the resolved declaring type.
*/
public ResolvedMember resolve(Member member) {
ResolvedType declaring = member.getDeclaringType().resolve(this);
if (declaring.isRawType())
declaring = declaring.getGenericType();
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
ResolvedMember ret;
if (member.getKind() == Member.FIELD) {
ret = declaring.lookupField(member);
} else {
ret = declaring.lookupMethod(member);
}
if (ret != null)
return ret;
return declaring.lookupSyntheticMember(member);
}
public abstract IWeavingSupport getWeavingSupport();
/**
* Create an advice shadow munger from the given advice attribute
*/
/**
* Create an advice shadow munger for the given advice kind
*/
public final Advice createAdviceMunger(AdviceKind kind, Pointcut p, Member signature, int extraParameterFlags,
IHasSourceLocation loc) {
AjAttribute.AdviceAttribute attribute = new AjAttribute.AdviceAttribute(kind, p, extraParameterFlags, loc.getStart(), loc
.getEnd(), loc.getSourceContext());
return getWeavingSupport().createAdviceMunger(attribute, p, signature);
}
/**
* Same signature as org.aspectj.util.PartialOrder.PartialComparable.compareTo
*/
public int compareByPrecedence(ResolvedType aspect1, ResolvedType aspect2) {
return precedenceCalculator.compareByPrecedence(aspect1, aspect2);
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
}
public Integer getPrecedenceIfAny(ResolvedType aspect1, ResolvedType aspect2) {
return precedenceCalculator.getPrecedenceIfAny(aspect1, aspect2);
}
/**
* compares by precedence with the additional rule that a super-aspect is sorted before its sub-aspects
*/
public int compareByPrecedenceAndHierarchy(ResolvedType aspect1, ResolvedType aspect2) {
return precedenceCalculator.compareByPrecedenceAndHierarchy(aspect1, aspect2);
}
/**
* Nobody should hold onto a copy of this message handler, or setMessageHandler won't work right.
*/
public IMessageHandler getMessageHandler() {
return messageHandler;
}
public void setMessageHandler(IMessageHandler messageHandler) {
if (this.isInPinpointMode()) {
this.messageHandler = new PinpointingMessageHandler(messageHandler);
} else {
this.messageHandler = messageHandler;
}
}
/**
* convenenience method for creating and issuing messages via the message handler - if you supply two locations you will get two
* messages.
*/
public void showMessage(Kind kind, String message, ISourceLocation loc1, ISourceLocation loc2) {
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
if (loc1 != null) {
messageHandler.handleMessage(new Message(message, kind, null, loc1));
if (loc2 != null) {
messageHandler.handleMessage(new Message(message, kind, null, loc2));
}
} else {
messageHandler.handleMessage(new Message(message, kind, null, loc2));
}
}
public void setCrossReferenceHandler(ICrossReferenceHandler xrefHandler) {
this.xrefHandler = xrefHandler;
}
/**
* Get the cross-reference handler for the world, may be null.
*/
public ICrossReferenceHandler getCrossReferenceHandler() {
return xrefHandler;
}
public void setTypeVariableLookupScope(TypeVariableDeclaringElement scope) {
typeVariableLookupScope = scope;
}
public TypeVariableDeclaringElement getTypeVariableLookupScope() {
return typeVariableLookupScope;
}
public List getDeclareParents() {
return crosscuttingMembersSet.getDeclareParents();
}
public List getDeclareAnnotationOnTypes() {
return crosscuttingMembersSet.getDeclareAnnotationOnTypes();
}
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
public List getDeclareAnnotationOnFields() {
return crosscuttingMembersSet.getDeclareAnnotationOnFields();
}
public List getDeclareAnnotationOnMethods() {
return crosscuttingMembersSet.getDeclareAnnotationOnMethods();
}
public List getDeclareSoft() {
return crosscuttingMembersSet.getDeclareSofts();
}
public CrosscuttingMembersSet getCrosscuttingMembersSet() {
return crosscuttingMembersSet;
}
public IStructureModel getModel() {
return model;
}
public void setModel(IStructureModel model) {
this.model = model;
}
public Lint getLint() {
return lint;
}
public void setLint(Lint lint) {
this.lint = lint;
}
public boolean isXnoInline() {
return XnoInline;
}
public void setXnoInline(boolean xnoInline) {
XnoInline = xnoInline;
}
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
public boolean isXlazyTjp() {
return XlazyTjp;
}
public void setXlazyTjp(boolean b) {
XlazyTjp = b;
}
public boolean isHasMemberSupportEnabled() {
return XhasMember;
}
public void setXHasMemberSupportEnabled(boolean b) {
XhasMember = b;
}
public boolean isInPinpointMode() {
return Xpinpoint;
}
public void setPinpointMode(boolean b) {
Xpinpoint = b;
}
public void setBehaveInJava5Way(boolean b) {
behaveInJava5Way = b;
}
/**
* Set the error and warning threashold which can be taken from CompilerOptions (see bug 129282)
*
* @param errorThreshold
* @param warningThreshold
*/
public void setErrorAndWarningThreshold(long errorThreshold, long warningThreshold) {
this.errorThreshold = errorThreshold;
this.warningThreshold = warningThreshold;
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
}
/**
* @return true if ignoring the UnusedDeclaredThrownException and false if this compiler option is set to error or warning
*/
public boolean isIgnoringUnusedDeclaredThrownException() {
if ((errorThreshold & 0x800000) != 0 || (warningThreshold & 0x800000) != 0)
return false;
return true;
}
public void performExtraConfiguration(String config) {
if (config == null)
return;
extraConfiguration = new Properties();
int pos = -1;
while ((pos = config.indexOf(",")) != -1) {
String nvpair = config.substring(0, pos);
int pos2 = nvpair.indexOf("=");
if (pos2 != -1) {
String n = nvpair.substring(0, pos2);
String v = nvpair.substring(pos2 + 1);
extraConfiguration.setProperty(n, v);
}
config = config.substring(pos + 1);
}
if (config.length() > 0) {
int pos2 = config.indexOf("=");
if (pos2 != -1) {
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
String n = config.substring(0, pos2);
String v = config.substring(pos2 + 1);
extraConfiguration.setProperty(n, v);
}
}
ensureAdvancedConfigurationProcessed();
}
/**
* may return null
*/
public Properties getExtraConfiguration() {
return extraConfiguration;
}
public final static String xsetWEAVE_JAVA_PACKAGES = "weaveJavaPackages";
public final static String xsetWEAVE_JAVAX_PACKAGES = "weaveJavaxPackages";
public final static String xsetCAPTURE_ALL_CONTEXT = "captureAllContext";
public final static String xsetRUN_MINIMAL_MEMORY = "runMinimalMemory";
public final static String xsetDEBUG_STRUCTURAL_CHANGES_CODE = "debugStructuralChangesCode";
public final static String xsetDEBUG_BRIDGING = "debugBridging";
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
public final static String xsetBCEL_REPOSITORY_CACHING = "bcelRepositoryCaching";
public final static String xsetPIPELINE_COMPILATION = "pipelineCompilation";
public final static String xsetGENERATE_STACKMAPS = "generateStackMaps";
public final static String xsetPIPELINE_COMPILATION_DEFAULT = "true";
public final static String xsetCOMPLETE_BINARY_TYPES = "completeBinaryTypes";
public final static String xsetCOMPLETE_BINARY_TYPES_DEFAULT = "false";
public final static String xsetTYPE_DEMOTION = "typeDemotion";
public final static String xsetTYPE_DEMOTION_DEBUG = "typeDemotionDebug";
public final static String xsetTYPE_REFS = "useWeakTypeRefs";
public final static String xsetBCEL_REPOSITORY_CACHING_DEFAULT = "true";
public final static String xsetFAST_PACK_METHODS = "fastPackMethods";
public boolean isInJava5Mode() {
return behaveInJava5Way;
}
public void setTargetAspectjRuntimeLevel(String s) {
targetAspectjRuntimeLevel = s;
}
public void setOptionalJoinpoints(String jps) {
if (jps == null)
return;
if (jps.indexOf("arrayconstruction") != -1)
optionalJoinpoint_ArrayConstruction = true;
if (jps.indexOf("synchronization") != -1)
optionalJoinpoint_Synchronization = true;
}
public boolean isJoinpointArrayConstructionEnabled() {
return optionalJoinpoint_ArrayConstruction;
}
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
public boolean isJoinpointSynchronizationEnabled() {
return optionalJoinpoint_Synchronization;
}
public String getTargetAspectjRuntimeLevel() {
return targetAspectjRuntimeLevel;
}
public boolean isTargettingAspectJRuntime12() {
boolean b = false;
if (!isInJava5Mode())
b = true;
else
b = getTargetAspectjRuntimeLevel().equals(org.aspectj.weaver.Constants.RUNTIME_LEVEL_12);
return b;
}
/*
* Map of types in the world, can have 'references' to expendable ones which can be garbage collected to recover memory. An
* expendable type is a reference type that is not exposed to the weaver (ie just pulled in for type resolution purposes).
*/
protected static class TypeMap {
private static boolean debug = false;
private boolean demotionSystemActive = false;
private boolean debugDemotion = false;
public final static int DONT_USE_REFS = 0;
public final static int USE_WEAK_REFS = 1;
public final static int USE_SOFT_REFS = 2;
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
List addedSinceLastDemote;
public int policy = USE_SOFT_REFS;
final Map tMap = new HashMap();
final Map expendableMap = Collections.synchronizedMap(new WeakHashMap());
private final World w;
private boolean memoryProfiling = false;
private int maxExpendableMapSize = -1;
private int collectedTypes = 0;
private final ReferenceQueue rq = new ReferenceQueue();
private static Trace trace = TraceFactory.getTraceFactory().getTrace(World.TypeMap.class);
TypeMap(World w) {
addedSinceLastDemote = new ArrayList();
this.w = w;
memoryProfiling = false;
}
/**
* Go through any types added during the previous file weave. If any are suitable for demotion, then put them in the
* expendable map where GC can claim them at some point later. Demotion means: the type is not an aspect, the type is not
* java.lang.Object, the type is not primitive and the type is not affected by type mungers in any way. Further refinements
* of these conditions may allow for more demotions.
*
* @return number of types demoted
*/
public int demote() {
if (!demotionSystemActive) {
return 0;
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
}
int demotionCounter = 0;
Iterator iter = addedSinceLastDemote.iterator();
do {
if (!iter.hasNext()) {
break;
}
String key = (String) iter.next();
ResolvedType type = (ResolvedType) tMap.get(key);
if (type != null && !type.isAspect() && !type.equals(UnresolvedType.OBJECT) && !type.isPrimitiveType()) {
List typeMungers = type.getInterTypeMungers();
if (typeMungers == null || typeMungers.size() == 0) {
tMap.remove(key);
if (!expendableMap.containsKey(key)) {
if (policy == USE_SOFT_REFS) {
expendableMap.put(key, new SoftReference(type));
} else {
expendableMap.put(key, new WeakReference(type));
}
}
demotionCounter++;
}
}
} while (true);
if (debugDemotion) {
System.out.println("Demoted " + demotionCounter + " types. Types remaining in fixed set #" + tMap.keySet().size());
}
addedSinceLastDemote.clear();
return demotionCounter;
}
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
/**
* Add a new type into the map, the key is the type signature. Some types do *not* go in the map, these are ones involving
* *member* type variables. The reason is that when all you have is the signature which gives you a type variable name, you
* cannot guarantee you are using the type variable in the same way as someone previously working with a similarly named
* type variable. So, these do not go into the map: - TypeVariableReferenceType. - ParameterizedType where a member type
* variable is involved. - BoundedReferenceType when one of the bounds is a type variable.
*
* definition: "member type variables" - a tvar declared on a generic method/ctor as opposed to those you see declared on a
* generic type.
*/
public ResolvedType put(String key, ResolvedType type) {
if (type.isParameterizedType() && type.isParameterizedWithTypeVariable()) {
if (debug)
System.err
.println("Not putting a parameterized type that utilises member declared type variables into the typemap: key="
+ key + " type=" + type);
return type;
}
if (type.isTypeVariableReference()) {
if (debug)
System.err.println("Not putting a type variable reference type into the typemap: key=" + key + " type=" + type);
return type;
}
if (type instanceof BoundedReferenceType) {
if (debug)
System.err.println("Not putting a bounded reference type into the typemap: key=" + key + " type=" + type);
return type;
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
}
if (type instanceof MissingResolvedTypeWithKnownSignature) {
if (debug)
System.err.println("Not putting a missing type into the typemap: key=" + key + " type=" + type);
return type;
}
if ((type instanceof ReferenceType) && (((ReferenceType) type).getDelegate() == null) && w.isExpendable(type)) {
if (debug)
System.err.println("Not putting expendable ref type with null delegate into typemap: key=" + key + " type="
+ type);
return type;
}
if (w.isExpendable(type)) {
if (policy == USE_WEAK_REFS) {
if (memoryProfiling)
expendableMap.put(key, new WeakReference(type, rq));
else
expendableMap.put(key, new WeakReference(type));
} else if (policy == USE_SOFT_REFS) {
if (memoryProfiling)
expendableMap.put(key, new SoftReference(type, rq));
else
expendableMap.put(key, new SoftReference(type));
} else {
expendableMap.put(key, type);
}
if (memoryProfiling && expendableMap.size() > maxExpendableMapSize) {
maxExpendableMapSize = expendableMap.size();
}
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
return type;
} else {
if (demotionSystemActive) {
addedSinceLastDemote.add(key);
}
return (ResolvedType) tMap.put(key, type);
}
}
public void report() {
if (!memoryProfiling)
return;
checkq();
w.getMessageHandler().handleMessage(
MessageUtil.info("MEMORY: world expendable type map reached maximum size of #" + maxExpendableMapSize
+ " entries"));
w.getMessageHandler().handleMessage(
MessageUtil.info("MEMORY: types collected through garbage collection #" + collectedTypes + " entries"));
}
public void checkq() {
if (!memoryProfiling)
return;
while (rq.poll() != null)
collectedTypes++;
}
/**
* Lookup a type by its signature, always look in the real map before the expendable map
*/
public ResolvedType get(String key) {
checkq();
ResolvedType ret = (ResolvedType) tMap.get(key);
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
if (ret == null) {
if (policy == USE_WEAK_REFS) {
WeakReference ref = (WeakReference) expendableMap.get(key);
if (ref != null) {
ret = (ResolvedType) ref.get();
}
} else if (policy == USE_SOFT_REFS) {
SoftReference ref = (SoftReference) expendableMap.get(key);
if (ref != null) {
ret = (ResolvedType) ref.get();
}
} else {
return (ResolvedType) expendableMap.get(key);
}
}
return ret;
}
public ResolvedType remove(String key) {
ResolvedType ret = (ResolvedType) tMap.remove(key);
if (ret == null) {
if (policy == USE_WEAK_REFS) {
WeakReference wref = (WeakReference) expendableMap.remove(key);
if (wref != null)
ret = (ResolvedType) wref.get();
} else if (policy == USE_SOFT_REFS) {
SoftReference wref = (SoftReference) expendableMap.remove(key);
if (wref != null)
ret = (ResolvedType) wref.get();
} else {
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
ret = (ResolvedType) expendableMap.remove(key);
}
}
return ret;
}
}
/**
* This class is used to compute and store precedence relationships between aspects.
*/
private static class AspectPrecedenceCalculator {
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
private final World world;
private final Map cachedResults;
public AspectPrecedenceCalculator(World forSomeWorld) {
world = forSomeWorld;
cachedResults = new HashMap();
}
/**
* Ask every declare precedence in the world to order the two aspects. If more than one declare precedence gives an
* ordering, and the orderings conflict, then that's an error.
*/
public int compareByPrecedence(ResolvedType firstAspect, ResolvedType secondAspect) {
PrecedenceCacheKey key = new PrecedenceCacheKey(firstAspect, secondAspect);
if (cachedResults.containsKey(key)) {
return ((Integer) cachedResults.get(key)).intValue();
} else {
int order = 0;
DeclarePrecedence orderer = null;
for (Iterator i = world.getCrosscuttingMembersSet().getDeclareDominates().iterator(); i.hasNext();) {
DeclarePrecedence d = (DeclarePrecedence) i.next();
int thisOrder = d.compare(firstAspect, secondAspect);
if (thisOrder != 0) {
if (orderer == null)
orderer = d;
if (order != 0 && order != thisOrder) {
ISourceLocation[] isls = new ISourceLocation[2];
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
isls[0] = orderer.getSourceLocation();
isls[1] = d.getSourceLocation();
Message m = new Message("conflicting declare precedence orderings for aspects: "
+ firstAspect.getName() + " and " + secondAspect.getName(), null, true, isls);
world.getMessageHandler().handleMessage(m);
} else {
order = thisOrder;
}
}
}
cachedResults.put(key, new Integer(order));
return order;
}
}
public Integer getPrecedenceIfAny(ResolvedType aspect1, ResolvedType aspect2) {
return (Integer) cachedResults.get(new PrecedenceCacheKey(aspect1, aspect2));
}
public int compareByPrecedenceAndHierarchy(ResolvedType firstAspect, ResolvedType secondAspect) {
if (firstAspect.equals(secondAspect))
return 0;
int ret = compareByPrecedence(firstAspect, secondAspect);
if (ret != 0)
return ret;
if (firstAspect.isAssignableFrom(secondAspect))
return -1;
else if (secondAspect.isAssignableFrom(firstAspect))
return +1;
return 0;
}
private static class PrecedenceCacheKey {
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
public ResolvedType aspect1;
public ResolvedType aspect2;
public PrecedenceCacheKey(ResolvedType a1, ResolvedType a2) {
aspect1 = a1;
aspect2 = a2;
}
public boolean equals(Object obj) {
if (!(obj instanceof PrecedenceCacheKey))
return false;
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
PrecedenceCacheKey other = (PrecedenceCacheKey) obj;
return (aspect1 == other.aspect1 && aspect2 == other.aspect2);
}
public int hashCode() {
return aspect1.hashCode() + aspect2.hashCode();
}
}
}
public void validateType(UnresolvedType type) {
}
private final Map workInProgress1 = new HashMap();
public TypeVariable[] getTypeVariablesCurrentlyBeingProcessed(Class baseClass) {
return (TypeVariable[]) workInProgress1.get(baseClass);
}
public void recordTypeVariablesCurrentlyBeingProcessed(Class baseClass, TypeVariable[] typeVariables) {
workInProgress1.put(baseClass, typeVariables);
}
public void forgetTypeVariablesCurrentlyBeingProcessed(Class baseClass) {
workInProgress1.remove(baseClass);
}
public void setAddSerialVerUID(boolean b) {
addSerialVerUID = b;
}
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
public boolean isAddSerialVerUID() {
return addSerialVerUID;
}
public void flush() {
typeMap.expendableMap.clear();
}
public void ensureAdvancedConfigurationProcessed() {
if (!checkedAdvancedConfiguration) {
Properties p = getExtraConfiguration();
if (p != null) {
String s = p.getProperty(xsetBCEL_REPOSITORY_CACHING, xsetBCEL_REPOSITORY_CACHING_DEFAULT);
bcelRepositoryCaching = s.equalsIgnoreCase("true");
if (!bcelRepositoryCaching) {
getMessageHandler().handleMessage(
MessageUtil
.info("[bcelRepositoryCaching=false] AspectJ will not use a bcel cache for class information"));
}
s = p.getProperty(xsetFAST_PACK_METHODS, "true");
fastMethodPacking = s.equalsIgnoreCase("true");
s = p.getProperty(xsetPIPELINE_COMPILATION, xsetPIPELINE_COMPILATION_DEFAULT);
shouldPipelineCompilation = s.equalsIgnoreCase("true");
s = p.getProperty(xsetGENERATE_STACKMAPS, "false");
shouldGenerateStackMaps = s.equalsIgnoreCase("true");
s = p.getProperty(xsetCOMPLETE_BINARY_TYPES, xsetCOMPLETE_BINARY_TYPES_DEFAULT);
completeBinaryTypes = s.equalsIgnoreCase("true");
if (completeBinaryTypes) {
getMessageHandler().handleMessage(
MessageUtil.info("[completeBinaryTypes=true] Completion of binary types activated"));
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
}
s = p.getProperty(xsetTYPE_DEMOTION, "false");
if (s.equalsIgnoreCase("true")) {
typeMap.demotionSystemActive = true;
}
s = p.getProperty(xsetTYPE_DEMOTION_DEBUG, "false");
if (s.equalsIgnoreCase("true")) {
typeMap.debugDemotion = true;
}
s = p.getProperty(xsetTYPE_REFS, "false");
if (s.equalsIgnoreCase("true")) {
typeMap.policy = TypeMap.USE_WEAK_REFS;
}
s = p.getProperty(xsetRUN_MINIMAL_MEMORY, "false");
runMinimalMemory = s.equalsIgnoreCase("true");
s = p.getProperty(xsetDEBUG_STRUCTURAL_CHANGES_CODE, "false");
forDEBUG_structuralChangesCode = s.equalsIgnoreCase("true");
s = p.getProperty(xsetDEBUG_BRIDGING, "false");
forDEBUG_bridgingCode = s.equalsIgnoreCase("true");
}
checkedAdvancedConfiguration = true;
}
}
public boolean isRunMinimalMemory() {
ensureAdvancedConfigurationProcessed();
return runMinimalMemory;
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
}
public boolean shouldFastPackMethods() {
ensureAdvancedConfigurationProcessed();
return fastMethodPacking;
}
public boolean shouldPipelineCompilation() {
ensureAdvancedConfigurationProcessed();
return shouldPipelineCompilation;
}
public boolean shouldGenerateStackMaps() {
ensureAdvancedConfigurationProcessed();
return shouldGenerateStackMaps;
}
public void setIncrementalCompileCouldFollow(boolean b) {
incrementalCompileCouldFollow = b;
}
public boolean couldIncrementalCompileFollow() {
return incrementalCompileCouldFollow;
}
public void setSynchronizationPointcutsInUse() {
if (trace.isTraceEnabled())
trace.enter("setSynchronizationPointcutsInUse", this);
synchronizationPointcutsInUse = true;
if (trace.isTraceEnabled())
trace.exit("setSynchronizationPointcutsInUse");
}
public boolean areSynchronizationPointcutsInUse() {
return synchronizationPointcutsInUse;
}
/**
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
* Register a new pointcut designator handler with the world - this can be used by any pointcut parsers attached to the world.
*
* @param designatorHandler handler for the new pointcut
*/
public void registerPointcutHandler(PointcutDesignatorHandler designatorHandler) {
if (pointcutDesignators == null)
pointcutDesignators = new HashSet();
pointcutDesignators.add(designatorHandler);
}
public Set getRegisteredPointcutHandlers() {
if (pointcutDesignators == null)
return Collections.EMPTY_SET;
return pointcutDesignators;
}
public void reportMatch(ShadowMunger munger, Shadow shadow) {
}
public void reportCheckerMatch(Checker checker, Shadow shadow) {
}
/**
* @return true if this world has the activation and scope of application of the aspects controlled via aop.xml files
*/
public boolean isXmlConfigured() {
return false;
}
public boolean isAspectIncluded(ResolvedType aspectType) {
return true;
}
public TypePattern getAspectScope(ResolvedType declaringType) {
return null;
}
|
285,172 |
Bug 285172 Sometimes when load-time weaving there will be two ReferenceType objects for the same type
|
Seen by Ramnivas. A pointcut uses an exact type name for an annotation execution(* (@Controller *..*).*(..)) Resolving this pointcut causes us to construct a ReferenceType for 'Controller'. Then we attempt to populate it by loading the class implementation. This recurses back into the weaver as Controller is loaded and an attempt is made to weave it. This takes a second route through the weaver to build a referencetype again and this second referencetype is cached in the world. When we unwind, we continue building the original referencetype and are left with one in the cache and the one resolved for the pointcut. Due to the use of == for comparison, we fail to match on join points later because they will use the ReferenceType from the cache.
|
resolved fixed
|
dd7d879
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-07-30T15:29:40Z | 2009-07-30T16:06:40Z |
org.aspectj.matcher/src/org/aspectj/weaver/World.java
|
public Map getFixed() {
return typeMap.tMap;
}
public Map getExpendable() {
return typeMap.expendableMap;
}
/**
* Ask the type map to demote any types it can - we don't want them anchored forever.
*/
public void demote() {
typeMap.demote();
}
/**
* Reference types we don't intend to weave may be ejected from the cache if we need the space.
*/
protected boolean isExpendable(ResolvedType type) {
return (!type.equals(UnresolvedType.OBJECT) && (!type.isExposedToWeaver()) && (!type.isPrimitiveType()));
}
}
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
/* *******************************************************************
* Copyright (c) 2002 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
* RonBodkin/AndyClement optimizations for memory consumption/speed
* ******************************************************************/
package org.aspectj.weaver.bcel;
import java.io.PrintStream;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.aspectj.apache.bcel.classfile.AttributeUtils;
import org.aspectj.apache.bcel.classfile.Field;
import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.classfile.Method;
import org.aspectj.apache.bcel.classfile.Signature;
import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen;
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
import org.aspectj.apache.bcel.classfile.annotation.ElementNameValuePairGen;
import org.aspectj.apache.bcel.classfile.annotation.EnumElementValueGen;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.util.GenericSignature;
import org.aspectj.weaver.AbstractReferenceTypeDelegate;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.AjcMemberMaker;
import org.aspectj.weaver.AnnotationAJ;
import org.aspectj.weaver.AnnotationTargetKind;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.BindingScope;
import org.aspectj.weaver.ISourceContext;
import org.aspectj.weaver.ReferenceType;
import org.aspectj.weaver.ResolvedMember;
import org.aspectj.weaver.ResolvedPointcutDefinition;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.SourceContextImpl;
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.BcelGenericSignatureToTypeXConverter.GenericSignatureFormatException;
import org.aspectj.weaver.patterns.Declare;
import org.aspectj.weaver.patterns.DeclareErrorOrWarning;
import org.aspectj.weaver.patterns.DeclarePrecedence;
import org.aspectj.weaver.patterns.FormalBinding;
import org.aspectj.weaver.patterns.IScope;
import org.aspectj.weaver.patterns.PerClause;
public class BcelObjectType extends AbstractReferenceTypeDelegate {
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
public JavaClass javaClass;
private LazyClassGen lazyClassGen = null;
private int modifiers;
private String className;
private String superclassSignature;
private String superclassName;
private String[] interfaceSignatures;
private ResolvedMember[] fields = null;
private ResolvedMember[] methods = null;
private ResolvedType[] annotationTypes = null;
private AnnotationAJ[] annotations = null;
private TypeVariable[] typeVars = null;
private String retentionPolicy;
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
private AnnotationTargetKind[] annotationTargetKinds;
private AjAttribute.WeaverVersionInfo wvInfo = AjAttribute.WeaverVersionInfo.UNKNOWN;
private ResolvedPointcutDefinition[] pointcuts = null;
private ResolvedMember[] privilegedAccess = null;
private WeaverStateInfo weaverState = null;
private PerClause perClause = null;
private List typeMungers = Collections.EMPTY_LIST;
private List declares = Collections.EMPTY_LIST;
private GenericSignature.FormalTypeParameter[] formalsForResolution = null;
private String declaredSignature = null;
private boolean hasBeenWoven = false;
private boolean isGenericType = false;
private boolean isInterface;
private boolean isEnum;
private boolean isAnnotation;
private boolean isAnonymous;
private boolean isNested;
private boolean isObject = false;
private boolean isAnnotationStyleAspect = false;
private boolean isCodeStyleAspect = false;
private int bitflag = 0x0000;
private static final int DISCOVERED_ANNOTATION_RETENTION_POLICY = 0x0001;
private static final int UNPACKED_GENERIC_SIGNATURE = 0x0002;
private static final int UNPACKED_AJATTRIBUTES = 0x0004;
private static final int DISCOVERED_ANNOTATION_TARGET_KINDS = 0x0008;
private static final int DISCOVERED_DECLARED_SIGNATURE = 0x0010;
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
private static final int DISCOVERED_WHETHER_ANNOTATION_STYLE = 0x0020;
private static final String[] NO_INTERFACE_SIGS = new String[] {};
/*
* Notes: note(1): in some cases (perclause inheritance) we encounter unpacked state when calling getPerClause
*
* note(2): A BcelObjectType is 'damaged' if it has been modified from what was original constructed from the bytecode. This
* currently happens if the parents are modified or an annotation is added - ideally BcelObjectType should be immutable but
* that's a bigger piece of work. XXX
*/
BcelObjectType(ReferenceType resolvedTypeX, JavaClass javaClass, boolean exposedToWeaver) {
super(resolvedTypeX, exposedToWeaver);
this.javaClass = javaClass;
initializeFromJavaclass();
resolvedTypeX.setDelegate(this);
ISourceContext sourceContext = resolvedTypeX.getSourceContext();
if (sourceContext == SourceContextImpl.UNKNOWN_SOURCE_CONTEXT) {
sourceContext = new SourceContextImpl(this);
setSourceContext(sourceContext);
}
isObject = (javaClass.getSuperclassNameIndex() == 0);
ensureAspectJAttributesUnpacked();
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
setSourcefilename(javaClass.getSourceFileName());
}
public void setJavaClass(JavaClass newclass) {
this.javaClass = newclass;
resetState();
initializeFromJavaclass();
}
private void initializeFromJavaclass() {
isInterface = javaClass.isInterface();
isEnum = javaClass.isEnum();
isAnnotation = javaClass.isAnnotation();
isAnonymous = javaClass.isAnonymous();
isNested = javaClass.isNested();
modifiers = javaClass.getModifiers();
superclassName = javaClass.getSuperclassName();
className = javaClass.getClassName();
cachedGenericClassTypeSignature = null;
}
public boolean isInterface() {
return isInterface;
}
public boolean isEnum() {
return isEnum;
}
public boolean isAnnotation() {
return isAnnotation;
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
}
public boolean isAnonymous() {
return isAnonymous;
}
public boolean isNested() {
return isNested;
}
public int getModifiers() {
return modifiers;
}
/**
* Must take into account generic signature
*/
public ResolvedType getSuperclass() {
if (isObject)
return null;
ensureGenericSignatureUnpacked();
if (superclassSignature == null) {
if (superclassName == null)
superclassName = javaClass.getSuperclassName();
superclassSignature = getResolvedTypeX().getWorld().resolve(UnresolvedType.forName(superclassName)).getSignature();
}
World world = getResolvedTypeX().getWorld();
ResolvedType res = world.resolve(UnresolvedType.forSignature(superclassSignature));
return res;
}
public World getWorld() {
return getResolvedTypeX().getWorld();
}
/**
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
* Retrieves the declared interfaces - this allows for the generic signature on a type. If specified then the generic signature
* is used to work out the types - this gets around the results of erasure when the class was originally compiled.
*/
public ResolvedType[] getDeclaredInterfaces() {
ensureGenericSignatureUnpacked();
ResolvedType[] interfaceTypes = null;
if (interfaceSignatures == null) {
String[] names = javaClass.getInterfaceNames();
if (names.length == 0) {
interfaceSignatures = NO_INTERFACE_SIGS;
interfaceTypes = ResolvedType.NONE;
} else {
interfaceSignatures = new String[names.length];
interfaceTypes = new ResolvedType[names.length];
for (int i = 0, len = names.length; i < len; i++) {
interfaceTypes[i] = getResolvedTypeX().getWorld().resolve(UnresolvedType.forName(names[i]));
interfaceSignatures[i] = interfaceTypes[i].getSignature();
}
}
} else {
interfaceTypes = new ResolvedType[interfaceSignatures.length];
for (int i = 0, len = interfaceSignatures.length; i < len; i++) {
if (interfaceSignatures[i] == null) {
String msg = "Null interface signature (element:" + i + " of " + interfaceSignatures.length
+ "). Type for which we" + "are looking at interfaces is " + this.className + ".";
System.err.println(msg);
throw new BCException(msg);
}
interfaceTypes[i] = getResolvedTypeX().getWorld().resolve(UnresolvedType.forSignature(interfaceSignatures[i]));
}
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
}
return interfaceTypes;
}
public ResolvedMember[] getDeclaredMethods() {
ensureGenericSignatureUnpacked();
if (methods == null) {
Method[] ms = javaClass.getMethods();
methods = new ResolvedMember[ms.length];
for (int i = ms.length - 1; i >= 0; i--) {
methods[i] = new BcelMethod(this, ms[i]);
}
}
return methods;
}
public ResolvedMember[] getDeclaredFields() {
ensureGenericSignatureUnpacked();
if (fields == null) {
Field[] fs = javaClass.getFields();
fields = new ResolvedMember[fs.length];
for (int i = 0, len = fs.length; i < len; i++) {
fields[i] = new BcelField(this, fs[i]);
}
}
return fields;
}
public TypeVariable[] getTypeVariables() {
if (!isGeneric())
return TypeVariable.NONE;
if (typeVars == null) {
GenericSignature.ClassSignature classSig = getGenericClassTypeSignature();
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
typeVars = new TypeVariable[classSig.formalTypeParameters.length];
for (int i = 0; i < typeVars.length; i++) {
GenericSignature.FormalTypeParameter ftp = classSig.formalTypeParameters[i];
try {
typeVars[i] = BcelGenericSignatureToTypeXConverter.formalTypeParameter2TypeVariable(ftp,
classSig.formalTypeParameters, getResolvedTypeX().getWorld());
} catch (GenericSignatureFormatException e) {
throw new IllegalStateException("While getting the type variables for type " + this.toString()
+ " with generic signature " + classSig + " the following error condition was detected: "
+ e.getMessage());
}
}
}
return typeVars;
}
public Collection getTypeMungers() {
return typeMungers;
}
public Collection getDeclares() {
return declares;
}
public Collection getPrivilegedAccesses() {
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
if (privilegedAccess == null)
return Collections.EMPTY_LIST;
return Arrays.asList(privilegedAccess);
}
public ResolvedMember[] getDeclaredPointcuts() {
return pointcuts;
}
public boolean isAspect() {
return perClause != null;
}
/**
* Check if the type is an @AJ aspect (no matter if used from an LTW point of view). Such aspects are annotated with @Aspect
*
* @return true for @AJ aspect
*/
public boolean isAnnotationStyleAspect() {
if ((bitflag & DISCOVERED_WHETHER_ANNOTATION_STYLE) == 0) {
bitflag |= DISCOVERED_WHETHER_ANNOTATION_STYLE;
isAnnotationStyleAspect = !isCodeStyleAspect && hasAnnotation(AjcMemberMaker.ASPECT_ANNOTATION);
}
return isAnnotationStyleAspect;
}
/**
* Process any org.aspectj.weaver attributes stored against the class.
*/
private void ensureAspectJAttributesUnpacked() {
if ((bitflag & UNPACKED_AJATTRIBUTES) != 0)
return;
bitflag |= UNPACKED_AJATTRIBUTES;
IMessageHandler msgHandler = getResolvedTypeX().getWorld().getMessageHandler();
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
List l = Utility.readAjAttributes(className, javaClass.getAttributes(), getResolvedTypeX().getSourceContext(),
getResolvedTypeX().getWorld(), AjAttribute.WeaverVersionInfo.UNKNOWN);
List pointcuts = new ArrayList();
typeMungers = new ArrayList();
declares = new ArrayList();
processAttributes(l, pointcuts, false);
l = AtAjAttributes.readAj5ClassAttributes(((BcelWorld) getResolvedTypeX().getWorld()).getModelAsAsmManager(), javaClass,
getResolvedTypeX(), getResolvedTypeX().getSourceContext(), msgHandler, isCodeStyleAspect);
AjAttribute.Aspect deferredAspectAttribute = processAttributes(l, pointcuts, true);
if (pointcuts.size() == 0) {
this.pointcuts = ResolvedPointcutDefinition.NO_POINTCUTS;
} else {
this.pointcuts = (ResolvedPointcutDefinition[]) pointcuts.toArray(new ResolvedPointcutDefinition[pointcuts.size()]);
}
resolveAnnotationDeclares(l);
if (deferredAspectAttribute != null) {
perClause = deferredAspectAttribute.reifyFromAtAspectJ(this.getResolvedTypeX());
}
if (isAspect() && !Modifier.isAbstract(getModifiers()) && isGeneric()) {
msgHandler.handleMessage(MessageUtil.error("The generic aspect '" + getResolvedTypeX().getName()
+ "' must be declared abstract", getResolvedTypeX().getSourceLocation()));
}
}
private AjAttribute.Aspect processAttributes(List attributeList, List pointcuts, boolean fromAnnotations) {
AjAttribute.Aspect deferredAspectAttribute = null;
for (Iterator iter = attributeList.iterator(); iter.hasNext();) {
AjAttribute a = (AjAttribute) iter.next();
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
if (a instanceof AjAttribute.Aspect) {
if (fromAnnotations) {
deferredAspectAttribute = (AjAttribute.Aspect) a;
} else {
perClause = ((AjAttribute.Aspect) a).reify(this.getResolvedTypeX());
isCodeStyleAspect = true;
}
} else if (a instanceof AjAttribute.PointcutDeclarationAttribute) {
pointcuts.add(((AjAttribute.PointcutDeclarationAttribute) a).reify());
} else if (a instanceof AjAttribute.WeaverState) {
weaverState = ((AjAttribute.WeaverState) a).reify();
} else if (a instanceof AjAttribute.TypeMunger) {
typeMungers.add(((AjAttribute.TypeMunger) a).reify(getResolvedTypeX().getWorld(), getResolvedTypeX()));
} else if (a instanceof AjAttribute.DeclareAttribute) {
declares.add(((AjAttribute.DeclareAttribute) a).getDeclare());
} else if (a instanceof AjAttribute.PrivilegedAttribute) {
privilegedAccess = ((AjAttribute.PrivilegedAttribute) a).getAccessedMembers();
} else if (a instanceof AjAttribute.SourceContextAttribute) {
if (getResolvedTypeX().getSourceContext() instanceof SourceContextImpl) {
AjAttribute.SourceContextAttribute sca = (AjAttribute.SourceContextAttribute) a;
((SourceContextImpl) getResolvedTypeX().getSourceContext()).configureFromAttribute(sca.getSourceFileName(), sca
.getLineBreaks());
setSourcefilename(sca.getSourceFileName());
}
} else if (a instanceof AjAttribute.WeaverVersionInfo) {
wvInfo = (AjAttribute.WeaverVersionInfo) a;
} else {
throw new BCException("bad attribute " + a);
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
}
}
return deferredAspectAttribute;
}
/**
* Extra processing step needed because declares that come from annotations are not pre-resolved. We can't do the resolution
* until *after* the pointcuts have been resolved.
*
* @param attributeList
*/
private void resolveAnnotationDeclares(List attributeList) {
FormalBinding[] bindings = new org.aspectj.weaver.patterns.FormalBinding[0];
IScope bindingScope = new BindingScope(getResolvedTypeX(), getResolvedTypeX().getSourceContext(), bindings);
for (Iterator iter = attributeList.iterator(); iter.hasNext();) {
AjAttribute a = (AjAttribute) iter.next();
if (a instanceof AjAttribute.DeclareAttribute) {
Declare decl = (((AjAttribute.DeclareAttribute) a).getDeclare());
if (decl instanceof DeclareErrorOrWarning) {
decl.resolve(bindingScope);
} else if (decl instanceof DeclarePrecedence) {
((DeclarePrecedence) decl).setScopeForResolution(bindingScope);
}
}
}
}
public PerClause getPerClause() {
ensureAspectJAttributesUnpacked();
return perClause;
}
public JavaClass getJavaClass() {
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
return javaClass;
}
public void resetState() {
if (javaClass == null) {
throw new BCException("can't weave evicted type");
}
bitflag = 0x0000;
this.annotationTypes = null;
this.annotations = null;
this.interfaceSignatures = null;
this.superclassSignature = null;
this.superclassName = null;
this.fields = null;
this.methods = null;
this.pointcuts = null;
this.perClause = null;
this.weaverState = null;
this.lazyClassGen = null;
hasBeenWoven = false;
isObject = (javaClass.getSuperclassNameIndex() == 0);
isAnnotationStyleAspect = false;
ensureAspectJAttributesUnpacked();
}
public void finishedWith() {
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
}
public WeaverStateInfo getWeaverState() {
return weaverState;
}
void setWeaverState(WeaverStateInfo weaverState) {
this.weaverState = weaverState;
}
public void printWackyStuff(PrintStream out) {
if (typeMungers.size() > 0)
out.println(" TypeMungers: " + typeMungers);
if (declares.size() > 0)
out.println(" declares: " + declares);
}
/**
* Return the lazyClassGen associated with this type. For aspect types, this value will be cached, since it is used to inline
* advice. For non-aspect types, this lazyClassGen is always newly constructed.
*/
public LazyClassGen getLazyClassGen() {
LazyClassGen ret = lazyClassGen;
if (ret == null) {
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
ret = new LazyClassGen(this);
if (isAspect()) {
lazyClassGen = ret;
}
}
return ret;
}
public boolean isSynthetic() {
return getResolvedTypeX().isSynthetic();
}
public AjAttribute.WeaverVersionInfo getWeaverVersionAttribute() {
return wvInfo;
}
public ResolvedType[] getAnnotationTypes() {
ensureAnnotationsUnpacked();
return annotationTypes;
}
public AnnotationAJ[] getAnnotations() {
ensureAnnotationsUnpacked();
return annotations;
}
public boolean hasAnnotation(UnresolvedType ofType) {
ensureAnnotationsUnpacked();
for (int i = 0; i < annotationTypes.length; i++) {
ResolvedType ax = annotationTypes[i];
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
if (ax.equals(ofType))
return true;
}
return false;
}
public boolean isAnnotationWithRuntimeRetention() {
return (getRetentionPolicy() == null ? false : getRetentionPolicy().equals("RUNTIME"));
}
public String getRetentionPolicy() {
if ((bitflag & DISCOVERED_ANNOTATION_RETENTION_POLICY) == 0) {
bitflag |= DISCOVERED_ANNOTATION_RETENTION_POLICY;
retentionPolicy = null;
if (isAnnotation()) {
ensureAnnotationsUnpacked();
for (int i = annotations.length - 1; i >= 0; i--) {
AnnotationAJ ax = annotations[i];
if (ax.getTypeName().equals(UnresolvedType.AT_RETENTION.getName())) {
List values = ((BcelAnnotation) ax).getBcelAnnotation().getValues();
for (Iterator it = values.iterator(); it.hasNext();) {
ElementNameValuePairGen element = (ElementNameValuePairGen) it.next();
EnumElementValueGen v = (EnumElementValueGen) element.getValue();
retentionPolicy = v.getEnumValueString();
return retentionPolicy;
}
}
}
}
}
return retentionPolicy;
}
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
public boolean canAnnotationTargetType() {
AnnotationTargetKind[] targetKinds = getAnnotationTargetKinds();
if (targetKinds == null)
return true;
for (int i = 0; i < targetKinds.length; i++) {
if (targetKinds[i].equals(AnnotationTargetKind.TYPE)) {
return true;
}
}
return false;
}
public AnnotationTargetKind[] getAnnotationTargetKinds() {
if ((bitflag & DISCOVERED_ANNOTATION_TARGET_KINDS) != 0)
return annotationTargetKinds;
bitflag |= DISCOVERED_ANNOTATION_TARGET_KINDS;
annotationTargetKinds = null;
List targetKinds = new ArrayList();
if (isAnnotation()) {
AnnotationAJ[] annotationsOnThisType = getAnnotations();
for (int i = 0; i < annotationsOnThisType.length; i++) {
AnnotationAJ a = annotationsOnThisType[i];
if (a.getTypeName().equals(UnresolvedType.AT_TARGET.getName())) {
Set targets = a.getTargets();
if (targets != null) {
for (Iterator iterator = targets.iterator(); iterator.hasNext();) {
String targetKind = (String) iterator.next();
if (targetKind.equals("ANNOTATION_TYPE")) {
targetKinds.add(AnnotationTargetKind.ANNOTATION_TYPE);
} else if (targetKind.equals("CONSTRUCTOR")) {
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
targetKinds.add(AnnotationTargetKind.CONSTRUCTOR);
} else if (targetKind.equals("FIELD")) {
targetKinds.add(AnnotationTargetKind.FIELD);
} else if (targetKind.equals("LOCAL_VARIABLE")) {
targetKinds.add(AnnotationTargetKind.LOCAL_VARIABLE);
} else if (targetKind.equals("METHOD")) {
targetKinds.add(AnnotationTargetKind.METHOD);
} else if (targetKind.equals("PACKAGE")) {
targetKinds.add(AnnotationTargetKind.PACKAGE);
} else if (targetKind.equals("PARAMETER")) {
targetKinds.add(AnnotationTargetKind.PARAMETER);
} else if (targetKind.equals("TYPE")) {
targetKinds.add(AnnotationTargetKind.TYPE);
}
}
}
}
}
if (!targetKinds.isEmpty()) {
annotationTargetKinds = new AnnotationTargetKind[targetKinds.size()];
return (AnnotationTargetKind[]) targetKinds.toArray(annotationTargetKinds);
}
}
return annotationTargetKinds;
}
private void ensureAnnotationsUnpacked() {
if (annotationTypes == null) {
AnnotationGen annos[] = javaClass.getAnnotations();
if (annos == null || annos.length == 0) {
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
annotationTypes = ResolvedType.NONE;
annotations = AnnotationAJ.EMPTY_ARRAY;
} else {
World w = getResolvedTypeX().getWorld();
annotationTypes = new ResolvedType[annos.length];
annotations = new AnnotationAJ[annos.length];
for (int i = 0; i < annos.length; i++) {
AnnotationGen annotation = annos[i];
annotationTypes[i] = w.resolve(UnresolvedType.forSignature(annotation.getTypeSignature()));
annotations[i] = new BcelAnnotation(annotation, w);
}
}
}
}
public String getDeclaredGenericSignature() {
ensureGenericInfoProcessed();
return declaredSignature;
}
private void ensureGenericSignatureUnpacked() {
if ((bitflag & UNPACKED_GENERIC_SIGNATURE) != 0)
return;
bitflag |= UNPACKED_GENERIC_SIGNATURE;
if (!getResolvedTypeX().getWorld().isInJava5Mode())
return;
GenericSignature.ClassSignature cSig = getGenericClassTypeSignature();
if (cSig != null) {
formalsForResolution = cSig.formalTypeParameters;
if (isNested()) {
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
GenericSignature.FormalTypeParameter[] extraFormals = getFormalTypeParametersFromOuterClass();
if (extraFormals.length > 0) {
List allFormals = new ArrayList();
for (int i = 0; i < formalsForResolution.length; i++) {
allFormals.add(formalsForResolution[i]);
}
for (int i = 0; i < extraFormals.length; i++) {
allFormals.add(extraFormals[i]);
}
formalsForResolution = new GenericSignature.FormalTypeParameter[allFormals.size()];
allFormals.toArray(formalsForResolution);
}
}
GenericSignature.ClassTypeSignature superSig = cSig.superclassSignature;
try {
ResolvedType rt = BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(superSig, formalsForResolution,
getResolvedTypeX().getWorld());
this.superclassSignature = rt.getSignature();
this.superclassName = rt.getName();
} catch (GenericSignatureFormatException e) {
throw new IllegalStateException("While determining the generic superclass of " + this.className
+ " with generic signature " + getDeclaredGenericSignature() + " the following error was detected: "
+ e.getMessage());
}
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
if (cSig.superInterfaceSignatures.length == 0) {
this.interfaceSignatures = NO_INTERFACE_SIGS;
} else {
this.interfaceSignatures = new String[cSig.superInterfaceSignatures.length];
for (int i = 0; i < cSig.superInterfaceSignatures.length; i++) {
try {
this.interfaceSignatures[i] = BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
cSig.superInterfaceSignatures[i], formalsForResolution, getResolvedTypeX().getWorld())
.getSignature();
} catch (GenericSignatureFormatException e) {
throw new IllegalStateException("While determing the generic superinterfaces of " + this.className
+ " with generic signature " + getDeclaredGenericSignature()
+ " the following error was detected: " + e.getMessage());
}
}
}
}
if (isGeneric()) {
ReferenceType genericType = (ReferenceType) this.resolvedTypeX.getGenericType();
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
genericType.setStartPos(this.resolvedTypeX.getStartPos());
this.resolvedTypeX = genericType;
}
}
public GenericSignature.FormalTypeParameter[] getAllFormals() {
ensureGenericSignatureUnpacked();
if (formalsForResolution == null) {
return new GenericSignature.FormalTypeParameter[0];
} else {
return formalsForResolution;
}
}
public ResolvedType getOuterClass() {
if (!isNested())
throw new IllegalStateException("Can't get the outer class of a non-nested type");
int lastDollar = className.lastIndexOf('$');
String superClassName = className.substring(0, lastDollar);
UnresolvedType outer = UnresolvedType.forName(superClassName);
return outer.resolve(getResolvedTypeX().getWorld());
}
private void ensureGenericInfoProcessed() {
if ((bitflag & DISCOVERED_DECLARED_SIGNATURE) != 0)
return;
bitflag |= DISCOVERED_DECLARED_SIGNATURE;
Signature sigAttr = AttributeUtils.getSignatureAttribute(javaClass.getAttributes());
declaredSignature = (sigAttr == null ? null : sigAttr.getSignature());
if (declaredSignature != null)
isGenericType = (declaredSignature.charAt(0) == '<');
}
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
public boolean isGeneric() {
ensureGenericInfoProcessed();
return isGenericType;
}
public String toString() {
return (javaClass == null ? "BcelObjectType" : "BcelObjectTypeFor:" + className);
}
public void evictWeavingState() {
if (getResolvedTypeX().getWorld().couldIncrementalCompileFollow())
return;
if (javaClass != null) {
ensureAnnotationsUnpacked();
ensureGenericInfoProcessed();
getDeclaredInterfaces();
getDeclaredFields();
getDeclaredMethods();
if (getResolvedTypeX().getWorld().isXnoInline())
lazyClassGen = null;
if (weaverState != null) {
|
287,315 |
Bug 287315 NPE using declare @type
|
reported by Ramnivas: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelObjectType.hasAnnotation(BcelObjectType.java:558) at org.aspectj.weaver.ReferenceType.hasAnnotation(ReferenceType.java:161) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:101) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:94) at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:513) at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:129) at org.aspectj.weaver.patterns.DeclareAnnotation.matches(DeclareAnnotation.java:269) at org.aspectj.weaver.bcel.BcelWeaver.applyDeclareAtType(BcelWeaver.java:1590)
|
resolved fixed
|
b664969
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-08-24T18:07:09Z | 2009-08-21T15:53:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
weaverState.setReweavable(false);
weaverState.setUnwovenClassFileData(null);
}
for (int i = methods.length - 1; i >= 0; i--)
methods[i].evictWeavingState();
for (int i = fields.length - 1; i >= 0; i--)
fields[i].evictWeavingState();
javaClass = null;
}
}
public void weavingCompleted() {
hasBeenWoven = true;
if (getResolvedTypeX().getWorld().isRunMinimalMemory())
evictWeavingState();
if (getSourceContext() != null && !getResolvedTypeX().isAspect())
getSourceContext().tidy();
}
public boolean hasBeenWoven() {
return hasBeenWoven;
}
public boolean copySourceContext() {
return false;
}
}
|
288,505 |
Bug 288505 failure to close inputstream
| null |
resolved fixed
|
3d3d03b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-03T16:21:37Z | 2009-09-03T15:00:00Z |
org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
|
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* PARC initial implementation
* ******************************************************************/
package org.aspectj.weaver;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.MessageFormat;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.weaver.tools.Trace;
import org.aspectj.weaver.tools.TraceFactory;
public class Lint {
|
288,505 |
Bug 288505 failure to close inputstream
| null |
resolved fixed
|
3d3d03b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-03T16:21:37Z | 2009-09-03T15:00:00Z |
org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
|
Map kinds = new HashMap();
World world;
public final Kind invalidAbsoluteTypeName = new Kind("invalidAbsoluteTypeName", "no match for this type name: {0}");
public final Kind invalidWildcardTypeName = new Kind("invalidWildcardTypeName", "no match for this type pattern: {0}");
public final Kind unresolvableMember = new Kind("unresolvableMember", "can not resolve this member: {0}");
public final Kind typeNotExposedToWeaver = new Kind("typeNotExposedToWeaver",
"this affected type is not exposed to the weaver: {0}");
public final Kind shadowNotInStructure = new Kind("shadowNotInStructure",
"the shadow for this join point is not exposed in the structure model: {0}");
public final Kind unmatchedSuperTypeInCall = new Kind("unmatchedSuperTypeInCall",
"does not match because declaring type is {0}, if match desired use target({1})");
public final Kind unmatchedTargetKind = new Kind("unmatchedTargetKind", "does not match because annotation {0} has @Target{1}");
public final Kind canNotImplementLazyTjp = new Kind("canNotImplementLazyTjp",
"can not implement lazyTjp on this joinpoint {0} because around advice is used");
public final Kind multipleAdviceStoppingLazyTjp = new Kind("multipleAdviceStoppingLazyTjp",
"can not implement lazyTjp at joinpoint {0} because of advice conflicts, see secondary locations to find conflicting advice");
public final Kind needsSerialVersionUIDField = new Kind("needsSerialVersionUIDField",
"serialVersionUID of type {0} needs to be set because of {1}");
public final Kind serialVersionUIDBroken = new Kind("brokeSerialVersionCompatibility",
"serialVersionUID of type {0} is broken because of added field {1}");
public final Kind noInterfaceCtorJoinpoint = new Kind("noInterfaceCtorJoinpoint",
"no interface constructor-execution join point - use {0}+ for implementing classes");
public final Kind noJoinpointsForBridgeMethods = new Kind(
"noJoinpointsForBridgeMethods",
"pointcut did not match on the method call to a bridge method. Bridge methods are generated by the compiler and have no join points");
public final Kind enumAsTargetForDecpIgnored = new Kind("enumAsTargetForDecpIgnored",
"enum type {0} matches a declare parents type pattern but is being ignored");
public final Kind annotationAsTargetForDecpIgnored = new Kind("annotationAsTargetForDecpIgnored",
|
288,505 |
Bug 288505 failure to close inputstream
| null |
resolved fixed
|
3d3d03b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-03T16:21:37Z | 2009-09-03T15:00:00Z |
org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
|
"annotation type {0} matches a declare parents type pattern but is being ignored");
public final Kind cantMatchArrayTypeOnVarargs = new Kind("cantMatchArrayTypeOnVarargs",
"an array type as the last parameter in a signature does not match on the varargs declared method: {0}");
public final Kind adviceDidNotMatch = new Kind("adviceDidNotMatch", "advice defined in {0} has not been applied");
public final Kind invalidTargetForAnnotation = new Kind("invalidTargetForAnnotation",
"{0} is not a valid target for annotation {1}, this annotation can only be applied to {2}");
public final Kind elementAlreadyAnnotated = new Kind("elementAlreadyAnnotated",
"{0} - already has an annotation of type {1}, cannot add a second instance");
public final Kind runtimeExceptionNotSoftened = new Kind("runtimeExceptionNotSoftened",
"{0} will not be softened as it is already a RuntimeException");
public final Kind uncheckedArgument = new Kind("uncheckedArgument",
"unchecked match of {0} with {1} when argument is an instance of {2} at join point {3}");
public final Kind uncheckedAdviceConversion = new Kind("uncheckedAdviceConversion",
"unchecked conversion when advice applied at shadow {0}, expected {1} but advice uses {2}");
public final Kind noGuardForLazyTjp = new Kind("noGuardForLazyTjp",
"can not build thisJoinPoint lazily for this advice since it has no suitable guard");
public final Kind noExplicitConstructorCall = new Kind("noExplicitConstructorCall",
"inter-type constructor does not contain explicit constructor call: field initializers in the target type will not be executed");
public final Kind aspectExcludedByConfiguration = new Kind("aspectExcludedByConfiguration",
"aspect {0} exluded for class loader {1}");
public final Kind unorderedAdviceAtShadow = new Kind("unorderedAdviceAtShadow",
"at this shadow {0} no precedence is specified between advice applying from aspect {1} and aspect {2}");
public final Kind swallowedExceptionInCatchBlock = new Kind("swallowedExceptionInCatchBlock",
"exception swallowed in catch block");
public final Kind calculatingSerialVersionUID = new Kind("calculatingSerialVersionUID",
"calculated SerialVersionUID for type {0} to be {1}");
public final Kind cantFindType = new Kind("cantFindType", "{0}");
public final Kind cantFindTypeAffectingJoinPointMatch = new Kind("cantFindTypeAffectingJPMatch", "{0}");
|
288,505 |
Bug 288505 failure to close inputstream
| null |
resolved fixed
|
3d3d03b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-03T16:21:37Z | 2009-09-03T15:00:00Z |
org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
|
public final Kind advisingSynchronizedMethods = new Kind("advisingSynchronizedMethods",
"advice matching the synchronized method shadow ''{0}'' will be executed outside the lock rather than inside (compiler limitation)");
public final Kind mustWeaveXmlDefinedAspects = new Kind(
"mustWeaveXmlDefinedAspects",
"XML Defined aspects must be woven in cases where cflow pointcuts are involved. Currently the include/exclude patterns exclude ''{0}''");
public final Kind cannotAdviseJoinpointInInterfaceWithAroundAdvice = new Kind(
"cannotAdviseJoinpointInInterfaceWithAroundAdvice",
"The joinpoint ''{0}'' cannot be advised and is being skipped as the compiler implementation will lead to creation of methods with bodies in an interface (compiler limitation)");
/**
* Indicates an aspect could not be found when attempting reweaving.
*/
public final Kind missingAspectForReweaving = new Kind("missingAspectForReweaving",
"aspect {0} cannot be found when reweaving {1}");
private static Trace trace = TraceFactory.getTraceFactory().getTrace(Lint.class);
public Lint(World world) {
if (trace.isTraceEnabled())
trace.enter("<init>", this, world);
this.world = world;
if (trace.isTraceEnabled())
trace.exit("<init>");
}
public void setAll(String messageKind) {
if (trace.isTraceEnabled())
trace.enter("setAll", this, messageKind);
setAll(getMessageKind(messageKind));
if (trace.isTraceEnabled())
trace.exit("setAll");
}
private void setAll(IMessage.Kind messageKind) {
for (Iterator i = kinds.values().iterator(); i.hasNext();) {
|
288,505 |
Bug 288505 failure to close inputstream
| null |
resolved fixed
|
3d3d03b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-03T16:21:37Z | 2009-09-03T15:00:00Z |
org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
|
Kind kind = (Kind) i.next();
kind.setKind(messageKind);
}
}
public void setFromProperties(File file) {
if (trace.isTraceEnabled())
trace.enter("setFromProperties", this, file);
try {
InputStream s = new FileInputStream(file);
setFromProperties(s);
} catch (IOException ioe) {
MessageUtil.error(world.getMessageHandler(), WeaverMessages.format(WeaverMessages.XLINT_LOAD_ERROR, file.getPath(), ioe
.getMessage()));
}
if (trace.isTraceEnabled())
trace.exit("setFromProperties");
}
public void loadDefaultProperties() {
InputStream s = getClass().getResourceAsStream("XlintDefault.properties");
if (s == null) {
MessageUtil.warn(world.getMessageHandler(), WeaverMessages.format(WeaverMessages.XLINTDEFAULT_LOAD_ERROR));
return;
}
try {
setFromProperties(s);
} catch (IOException ioe) {
MessageUtil.error(world.getMessageHandler(), WeaverMessages.format(WeaverMessages.XLINTDEFAULT_LOAD_PROBLEM, ioe
.getMessage()));
}
}
|
288,505 |
Bug 288505 failure to close inputstream
| null |
resolved fixed
|
3d3d03b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-03T16:21:37Z | 2009-09-03T15:00:00Z |
org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
|
private void setFromProperties(InputStream s) throws IOException {
Properties p = new Properties();
p.load(s);
setFromProperties(p);
}
public void setFromProperties(Properties properties) {
for (Iterator i = properties.entrySet().iterator(); i.hasNext();) {
Map.Entry entry = (Map.Entry) i.next();
Kind kind = (Kind) kinds.get(entry.getKey());
if (kind == null) {
MessageUtil.error(world.getMessageHandler(), WeaverMessages.format(WeaverMessages.XLINT_KEY_ERROR, entry.getKey()));
} else {
kind.setKind(getMessageKind((String) entry.getValue()));
}
}
}
public Collection allKinds() {
return kinds.values();
}
public Kind getLintKind(String name) {
return (Kind) kinds.get(name);
}
public void suppressKinds(Collection lintKind) {
if (lintKind.isEmpty())
return;
for (Iterator iter = lintKind.iterator(); iter.hasNext();) {
Kind k = (Kind) iter.next();
k.setSuppressed(true);
}
|
288,505 |
Bug 288505 failure to close inputstream
| null |
resolved fixed
|
3d3d03b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-03T16:21:37Z | 2009-09-03T15:00:00Z |
org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
|
}
public void clearAllSuppressions() {
for (Iterator iter = kinds.values().iterator(); iter.hasNext();) {
Kind k = (Kind) iter.next();
k.setSuppressed(false);
}
}
public void clearSuppressions(Collection lintKind) {
if (lintKind.isEmpty())
return;
for (Iterator iter = lintKind.iterator(); iter.hasNext();) {
Kind k = (Kind) iter.next();
k.setSuppressed(false);
}
}
private IMessage.Kind getMessageKind(String v) {
if (v.equals("ignore"))
return null;
else if (v.equals("warning"))
return IMessage.WARNING;
else if (v.equals("error"))
return IMessage.ERROR;
MessageUtil.error(world.getMessageHandler(), WeaverMessages.format(WeaverMessages.XLINT_VALUE_ERROR, v));
return null;
}
public Kind fromKey(String lintkey) {
return (Lint.Kind) kinds.get(lintkey);
}
public class Kind {
|
288,505 |
Bug 288505 failure to close inputstream
| null |
resolved fixed
|
3d3d03b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-03T16:21:37Z | 2009-09-03T15:00:00Z |
org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
|
private final String name;
private final String message;
private IMessage.Kind kind = IMessage.WARNING;
private boolean isSupressed = false;
public Kind(String name, String message) {
this.name = name;
this.message = message;
kinds.put(this.name, this);
}
public void setSuppressed(boolean shouldBeSuppressed) {
this.isSupressed = shouldBeSuppressed;
}
public boolean isEnabled() {
return (kind != null) && !isSupressed();
}
|
288,505 |
Bug 288505 failure to close inputstream
| null |
resolved fixed
|
3d3d03b
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-03T16:21:37Z | 2009-09-03T15:00:00Z |
org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
|
private boolean isSupressed() {
return isSupressed && (kind != IMessage.ERROR);
}
public String getName() {
return name;
}
public IMessage.Kind getKind() {
return kind;
}
public void setKind(IMessage.Kind kind) {
this.kind = kind;
}
public void signal(String info, ISourceLocation location) {
if (kind == null)
return;
String text = MessageFormat.format(message, new Object[] { info });
text += " [Xlint:" + name + "]";
world.getMessageHandler().handleMessage(new LintMessage(text, kind, location, null, getLintKind(name)));
}
public void signal(String[] infos, ISourceLocation location, ISourceLocation[] extraLocations) {
if (kind == null)
return;
String text = MessageFormat.format(message, (Object[]) infos);
text += " [Xlint:" + name + "]";
world.getMessageHandler().handleMessage(new LintMessage(text, kind, location, extraLocations, getLintKind(name)));
}
}
}
|
288,198 |
Bug 288198 LangUtils JVM version detection cannot handle Java 7
|
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 Build Identifier: 1.6.4 The JVM detection in LangUtils is currently unable to handle Java7, whilst this is naturally an unreleased version of the JVM, the fix is trivial. Reproducible: Always Steps to Reproduce: Attempt to use the LangUtils java version support on java7
|
resolved fixed
|
b29f839
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-04T16:36:07Z | 2009-09-01T01:53:20Z |
util/src/org/aspectj/util/LangUtil.java
|
/* *******************************************************************
* Copyright (c) 1999-2001 Xerox Corporation,
* 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http:www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Xerox/PARC initial implementation
* ******************************************************************/
package org.aspectj.util;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.security.PrivilegedActionException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
|
288,198 |
Bug 288198 LangUtils JVM version detection cannot handle Java 7
|
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 Build Identifier: 1.6.4 The JVM detection in LangUtils is currently unable to handle Java7, whilst this is naturally an unreleased version of the JVM, the fix is trivial. Reproducible: Always Steps to Reproduce: Attempt to use the LangUtils java version support on java7
|
resolved fixed
|
b29f839
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-04T16:36:07Z | 2009-09-01T01:53:20Z |
util/src/org/aspectj/util/LangUtil.java
|
import java.util.StringTokenizer;
/**
*
*/
public class LangUtil {
public static final String EOL;
static {
StringWriter buf = new StringWriter();
PrintWriter writer = new PrintWriter(buf);
writer.println("");
String eol = "\n";
try {
buf.close();
StringBuffer sb = buf.getBuffer();
if (sb != null) {
eol = buf.toString();
}
} catch (Throwable t) {
}
EOL = eol;
|
288,198 |
Bug 288198 LangUtils JVM version detection cannot handle Java 7
|
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 Build Identifier: 1.6.4 The JVM detection in LangUtils is currently unable to handle Java7, whilst this is naturally an unreleased version of the JVM, the fix is trivial. Reproducible: Always Steps to Reproduce: Attempt to use the LangUtils java version support on java7
|
resolved fixed
|
b29f839
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-04T16:36:07Z | 2009-09-01T01:53:20Z |
util/src/org/aspectj/util/LangUtil.java
|
}
/**
*/
}
try {
}
}
private static boolean is13VMOrGreater = true;
private static boolean is14VMOrGreater = true;
private static boolean is15VMOrGreater = false;
private static boolean is16VMOrGreater = false;
static {
String vm = System.getProperty("java.version");
if (vm == null)
vm = System.getProperty("java.runtime.version");
if (vm == null)
vm = System.getProperty("java.vm.version");
|
288,198 |
Bug 288198 LangUtils JVM version detection cannot handle Java 7
|
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 Build Identifier: 1.6.4 The JVM detection in LangUtils is currently unable to handle Java7, whilst this is naturally an unreleased version of the JVM, the fix is trivial. Reproducible: Always Steps to Reproduce: Attempt to use the LangUtils java version support on java7
|
resolved fixed
|
b29f839
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-04T16:36:07Z | 2009-09-01T01:53:20Z |
util/src/org/aspectj/util/LangUtil.java
|
if (vm.startsWith("1.3")) {
is14VMOrGreater = false;
} else if (vm.startsWith("1.5") || vm.startsWith("1.6")) {
is15VMOrGreater = true;
is16VMOrGreater = true;
}
}
public static boolean is13VMOrGreater() {
return is13VMOrGreater;
}
public static boolean is14VMOrGreater() {
return is14VMOrGreater;
}
public static boolean is15VMOrGreater() {
return is15VMOrGreater;
}
public static boolean is16VMOrGreater() {
return is16VMOrGreater;
}
/**
* Shorthand for "if null, throw IllegalArgumentException"
*
* @throws IllegalArgumentException "null {name}" if o is null
*/
public static final void throwIaxIfNull(final Object o, final String name) {
if (null == o) {
String message = "null " + (null == name ? "input" : name);
throw new IllegalArgumentException(message);
}
}
|
288,198 |
Bug 288198 LangUtils JVM version detection cannot handle Java 7
|
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 Build Identifier: 1.6.4 The JVM detection in LangUtils is currently unable to handle Java7, whilst this is naturally an unreleased version of the JVM, the fix is trivial. Reproducible: Always Steps to Reproduce: Attempt to use the LangUtils java version support on java7
|
resolved fixed
|
b29f839
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2009-09-04T16:36:07Z | 2009-09-01T01:53:20Z |
util/src/org/aspectj/util/LangUtil.java
|
/**
* Shorthand for
* "if not null or not assignable, throw IllegalArgumentException"
*
* @param c the Class to check - use null to ignore type check
* @throws IllegalArgumentException "null {name}" if o is null
*/
public static final void throwIaxIfNotAssignable(final Object ra[], final Class c, final String name) {
throwIaxIfNull(ra, name);
String label = (null == name ? "input" : name);
for (int i = 0; i < ra.length; i++) {
if (null == ra[i]) {
String m = " null " + label + "[" + i + "]";
throw new IllegalArgumentException(m);
} else if (null != c) {
Class actualClass = ra[i].getClass();
if (!c.isAssignableFrom(actualClass)) {
String message = label + " not assignable to " + c.getName();
throw new IllegalArgumentException(message);
}
}
}
}
/**
* Shorthand for
* "if not null or not assignable, throw IllegalArgumentException"
*
* @throws IllegalArgumentException "null {name}" if o is null
*/
public static final void throwIaxIfNotAssignable(final Object o, final Class c, final String name) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.