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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
isGeneric = false;
}
if (upperBound != null) upperBound = upperBound.resolveBindings(scope, bindings, allowBinding, requireExactType);
if (lowerBound != null) lowerBound = lowerBound.resolveBindings(scope, bindings, allowBinding, requireExactType);
String fullyQualifiedName = maybeGetCleanName();
if (fullyQualifiedName != null) {
return resolveBindingsFromFullyQualifiedTypeName(fullyQualifiedName, scope, bindings, allowBinding, requireExactType);
} else {
if (requireExactType) {
scope.getWorld().getMessageHandler().handleMessage(
MessageUtil.error(WeaverMessages.format(WeaverMessages.WILDCARD_NOT_ALLOWED),
getSourceLocation()));
return NO;
}
importedPrefixes = scope.getImportedPrefixes();
knownMatches = preMatch(scope.getImportedNames());
return this;
}
}
private TypePattern maybeResolveToAnyPattern(IScope scope, Bindings bindings,
boolean allowBinding, boolean requireExactType) {
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
if (annotationPattern == AnnotationTypePattern.ANY) {
if (dim == 0 && !isVarArgs && upperBound == null && lowerBound == null && (additionalInterfaceBounds == null || additionalInterfaceBounds.length==0)) {
return TypePattern.ANY;
}
} else {
annotationPattern = annotationPattern.resolveBindings(scope,bindings,allowBinding);
AnyWithAnnotationTypePattern ret = new AnyWithAnnotationTypePattern(annotationPattern);
ret.setLocation(sourceContext,start,end);
return ret;
}
return null;
}
private TypePattern maybeResolveToBindingTypePattern(IScope scope, Bindings bindings,
boolean allowBinding, boolean requireExactType) {
String simpleName = maybeGetSimpleName();
if (simpleName != null) {
FormalBinding formalBinding = scope.lookupFormal(simpleName);
if (formalBinding != null) {
if (bindings == null) {
scope.message(IMessage.ERROR, this, "negation doesn't allow binding");
return this;
}
if (!allowBinding) {
scope.message(IMessage.ERROR, this,
"name binding only allowed in target, this, and args pcds");
return this;
}
BindingTypePattern binding = new BindingTypePattern(formalBinding,isVarArgs);
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
binding.copyLocationFrom(this);
bindings.register(binding, scope);
return binding;
}
}
return null;
}
private TypePattern resolveBindingsFromFullyQualifiedTypeName(String fullyQualifiedName, IScope scope, Bindings bindings,
boolean allowBinding, boolean requireExactType) {
String originalName = fullyQualifiedName;
ResolvedType resolvedTypeInTheWorld = null;
UnresolvedType type;
resolvedTypeInTheWorld = lookupTypeInWorld(scope.getWorld(), fullyQualifiedName);
if (resolvedTypeInTheWorld.isGenericWildcard()) {
type = resolvedTypeInTheWorld;
} else {
type = lookupTypeInScope(scope, fullyQualifiedName, this);
}
if ((type instanceof ResolvedType) && ((ResolvedType)type).isMissing()) {
return resolveBindingsForMissingType(resolvedTypeInTheWorld, originalName, scope, bindings, allowBinding, requireExactType);
} else {
return resolveBindingsForExactType(scope,type,fullyQualifiedName,requireExactType);
}
}
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
private UnresolvedType lookupTypeInScope(IScope scope, String typeName, IHasPosition location) {
UnresolvedType type = null;
while (ResolvedType.isMissing(type = scope.lookupType(typeName, location))) {
int lastDot = typeName.lastIndexOf('.');
if (lastDot == -1) break;
typeName = typeName.substring(0, lastDot) + '$' + typeName.substring(lastDot+1);
}
return type;
}
private ResolvedType lookupTypeInWorld(World world, String typeName) {
ResolvedType ret = world.resolve(UnresolvedType.forName(typeName),true);
while (ret.isMissing()) {
int lastDot = typeName.lastIndexOf('.');
if (lastDot == -1) break;
typeName = typeName.substring(0, lastDot) + '$' + typeName.substring(lastDot+1);
ret = world.resolve(UnresolvedType.forName(typeName),true);
}
return ret;
}
private TypePattern resolveBindingsForExactType(IScope scope, UnresolvedType aType, String fullyQualifiedName,boolean requireExactType) {
TypePattern ret = null;
if (aType.isTypeVariableReference()) {
ret = resolveBindingsForTypeVariable(scope, (UnresolvedTypeVariableReferenceType) aType);
} else if (typeParameters.size()>0) {
ret = resolveParameterizedType(scope, aType, requireExactType);
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
} else if (upperBound != null || lowerBound != null) {
ret = resolveGenericWildcard(scope, aType);
} else {
if (dim != 0) aType = UnresolvedType.makeArray(aType, dim);
ret = new ExactTypePattern(aType,includeSubtypes,isVarArgs);
}
ret.setAnnotationTypePattern(annotationPattern);
ret.copyLocationFrom(this);
return ret;
}
private TypePattern resolveGenericWildcard(IScope scope, UnresolvedType aType) {
if (!aType.getSignature().equals(GENERIC_WILDCARD_CHARACTER)) throw new IllegalStateException("Can only have bounds for a generic wildcard");
boolean canBeExact = true;
if ((upperBound != null) && ResolvedType.isMissing(upperBound.getExactType())) canBeExact = false;
if ((lowerBound != null) && ResolvedType.isMissing(lowerBound.getExactType())) canBeExact = false;
if (canBeExact) {
ResolvedType type = null;
if (upperBound != null) {
if (upperBound.isIncludeSubtypes()) {
canBeExact = false;
} else {
ReferenceType upper = (ReferenceType) upperBound.getExactType().resolve(scope.getWorld());
type = new BoundedReferenceType(upper,true,scope.getWorld());
}
} else {
if (lowerBound.isIncludeSubtypes()) {
canBeExact = false;
} else {
ReferenceType lower = (ReferenceType) lowerBound.getExactType().resolve(scope.getWorld());
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
type = new BoundedReferenceType(lower,false,scope.getWorld());
}
}
if (canBeExact) {
return new ExactTypePattern(type,includeSubtypes,isVarArgs);
}
}
importedPrefixes = scope.getImportedPrefixes();
knownMatches = preMatch(scope.getImportedNames());
return this;
}
private TypePattern resolveParameterizedType(IScope scope, UnresolvedType aType, boolean requireExactType) {
if (!verifyTypeParameters(aType.resolve(scope.getWorld()),scope,requireExactType)) return TypePattern.NO;
if (typeParameters.areAllExactWithNoSubtypesAllowed()) {
TypePattern[] typePats = typeParameters.getTypePatterns();
UnresolvedType[] typeParameterTypes = new UnresolvedType[typePats.length];
for (int i = 0; i < typeParameterTypes.length; i++) {
typeParameterTypes[i] = ((ExactTypePattern)typePats[i]).getExactType();
}
ResolvedType type = TypeFactory.createParameterizedType(aType.resolve(scope.getWorld()), typeParameterTypes, scope.getWorld());
if (isGeneric) type = type.getGenericType();
if (dim != 0) type = ResolvedType.makeArray(type, dim);
return new ExactTypePattern(type,includeSubtypes,isVarArgs);
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
} else {
importedPrefixes = scope.getImportedPrefixes();
knownMatches = preMatch(scope.getImportedNames());
return this;
}
}
private TypePattern resolveBindingsForMissingType(ResolvedType typeFoundInWholeWorldSearch, String nameWeLookedFor, IScope scope, Bindings bindings,
boolean allowBinding, boolean requireExactType) {
if (requireExactType) {
if (!allowBinding) {
scope.getWorld().getMessageHandler().handleMessage(
MessageUtil.error(WeaverMessages.format(WeaverMessages.CANT_BIND_TYPE,nameWeLookedFor),
getSourceLocation()));
} else if (scope.getWorld().getLint().invalidAbsoluteTypeName.isEnabled()) {
scope.getWorld().getLint().invalidAbsoluteTypeName.signal(nameWeLookedFor, getSourceLocation());
}
return NO;
} else if (scope.getWorld().getLint().invalidAbsoluteTypeName.isEnabled()) {
if (typeFoundInWholeWorldSearch.isMissing()) {
scope.getWorld().getLint().invalidAbsoluteTypeName.signal(nameWeLookedFor, getSourceLocation());
}
}
importedPrefixes = scope.getImportedPrefixes();
knownMatches = preMatch(scope.getImportedNames());
return this;
}
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
/**
* We resolved the type to a type variable declared in the pointcut designator.
* Now we have to create either an exact type pattern or a wild type pattern for it,
* with upper and lower bounds set accordingly.
* XXX none of this stuff gets serialized yet
* @param scope
* @param tvrType
* @return
*/
private TypePattern resolveBindingsForTypeVariable(IScope scope, UnresolvedTypeVariableReferenceType tvrType) {
Bindings emptyBindings = new Bindings(0);
if (upperBound != null) {
upperBound = upperBound.resolveBindings(scope, emptyBindings, false, false);
}
if (lowerBound != null) {
lowerBound = lowerBound.resolveBindings(scope, emptyBindings, false, false);
}
if (additionalInterfaceBounds != null) {
TypePattern[] resolvedIfBounds = new TypePattern[additionalInterfaceBounds.length];
for (int i = 0; i < resolvedIfBounds.length; i++) {
resolvedIfBounds[i] = additionalInterfaceBounds[i].resolveBindings(scope, emptyBindings, false, false);
}
additionalInterfaceBounds = resolvedIfBounds;
}
if ( upperBound == null && lowerBound == null && additionalInterfaceBounds == null) {
ResolvedType rType = tvrType.resolve(scope.getWorld());
if (dim != 0) rType = ResolvedType.makeArray(rType, dim);
return new ExactTypePattern(rType,includeSubtypes,isVarArgs);
} else {
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
boolean canCreateExactTypePattern = true;
if (upperBound != null && ResolvedType.isMissing(upperBound.getExactType())) canCreateExactTypePattern = false;
if (lowerBound != null && ResolvedType.isMissing(lowerBound.getExactType())) canCreateExactTypePattern = false;
if (additionalInterfaceBounds != null) {
for (int i = 0; i < additionalInterfaceBounds.length; i++) {
if (ResolvedType.isMissing(additionalInterfaceBounds[i].getExactType())) canCreateExactTypePattern = false;
}
}
if (canCreateExactTypePattern) {
TypeVariable tv = tvrType.getTypeVariable();
if (upperBound != null) tv.setUpperBound(upperBound.getExactType());
if (lowerBound != null) tv.setLowerBound(lowerBound.getExactType());
if (additionalInterfaceBounds != null) {
UnresolvedType[] ifBounds = new UnresolvedType[additionalInterfaceBounds.length];
for (int i = 0; i < ifBounds.length; i++) {
ifBounds[i] = additionalInterfaceBounds[i].getExactType();
}
tv.setAdditionalInterfaceBounds(ifBounds);
}
ResolvedType rType = tvrType.resolve(scope.getWorld());
if (dim != 0) rType = ResolvedType.makeArray(rType, dim);
return new ExactTypePattern(rType,includeSubtypes,isVarArgs);
}
return this;
}
}
/**
* When this method is called, we have resolved the base type to an exact type.
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
* We also have a set of type patterns for the parameters.
* Time to perform some basic checks:
* - can the base type be parameterized? (is it generic)
* - can the type parameter pattern list match the number of parameters on the base type
* - do all parameter patterns meet the bounds of the respective type variables
* If any of these checks fail, a warning message is issued and we return false.
* @return
*/
private boolean verifyTypeParameters(ResolvedType baseType,IScope scope, boolean requireExactType) {
ResolvedType genericType = baseType.getGenericType();
if (genericType == null) {
scope.message(MessageUtil.warn(
WeaverMessages.format(WeaverMessages.NOT_A_GENERIC_TYPE,baseType.getName()),
getSourceLocation()));
return false;
}
int minRequiredTypeParameters = typeParameters.size();
boolean foundEllipsis = false;
TypePattern[] typeParamPatterns = typeParameters.getTypePatterns();
for (int i = 0; i < typeParamPatterns.length; i++) {
if (typeParamPatterns[i] instanceof WildTypePattern) {
WildTypePattern wtp = (WildTypePattern) typeParamPatterns[i];
if (wtp.ellipsisCount > 0) {
foundEllipsis = true;
minRequiredTypeParameters--;
}
}
}
TypeVariable[] tvs = genericType.getTypeVariables();
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
if ((tvs.length < minRequiredTypeParameters) ||
(!foundEllipsis && minRequiredTypeParameters != tvs.length))
{
String msg = WeaverMessages.format(WeaverMessages.INCORRECT_NUMBER_OF_TYPE_ARGUMENTS,
genericType.getName(),new Integer(tvs.length));
if (requireExactType) scope.message(MessageUtil.error(msg,getSourceLocation()));
else scope.message(MessageUtil.warn(msg,getSourceLocation()));
return false;
}
if (!boundscheckingoff) {
VerifyBoundsForTypePattern verification =
new VerifyBoundsForTypePattern(scope,genericType,requireExactType,typeParameters,getSourceLocation());
scope.getWorld().getCrosscuttingMembersSet().recordNecessaryCheck(verification);
}
return true;
}
/**
* By capturing the verification in this class, rather than performing it in verifyTypeParameters(),
* we can cope with situations where the interactions between generics and declare parents would
* otherwise cause us problems. For example, if verifying as we go along we may report a problem
* which would have been fixed by a declare parents that we haven't looked at yet. If we
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
* create and store a verification object, we can verify this later when the type system is
* considered 'complete'
*/
static class VerifyBoundsForTypePattern implements IVerificationRequired {
private IScope scope;
private ResolvedType genericType;
private boolean requireExactType;
private TypePatternList typeParameters = TypePatternList.EMPTY;
private ISourceLocation sLoc;
public VerifyBoundsForTypePattern(IScope scope, ResolvedType genericType, boolean requireExactType,
TypePatternList typeParameters, ISourceLocation sLoc) {
this.scope = scope;
this.genericType = genericType;
this.requireExactType = requireExactType;
this.typeParameters = typeParameters;
this.sLoc = sLoc;
}
public void verify() {
TypeVariable[] tvs = genericType.getTypeVariables();
TypePattern[] typeParamPatterns = typeParameters.getTypePatterns();
if (typeParameters.areAllExactWithNoSubtypesAllowed()) {
for (int i = 0; i < tvs.length; i++) {
UnresolvedType ut = typeParamPatterns[i].getExactType();
boolean continueCheck = true;
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
if (ut.isTypeVariableReference()) {
continueCheck = false;
}
if (continueCheck &&
!tvs[i].canBeBoundTo(ut.resolve(scope.getWorld()))) {
String parameterName = ut.getName();
if (ut.isTypeVariableReference()) parameterName = ((TypeVariableReference)ut).getTypeVariable().getDisplayName();
String msg =
WeaverMessages.format(
WeaverMessages.VIOLATES_TYPE_VARIABLE_BOUNDS,
parameterName,
new Integer(i+1),
tvs[i].getDisplayName(),
genericType.getName());
if (requireExactType) scope.message(MessageUtil.error(msg,sLoc));
else scope.message(MessageUtil.warn(msg,sLoc));
}
}
}
}
}
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
}
}
}
public boolean isStar() {
boolean annPatternStar = annotationPattern == AnnotationTypePattern.ANY;
return (isNamePatternStar() && annPatternStar);
}
private boolean isNamePatternStar() {
return namePatterns.length == 1 && namePatterns[0].isAny();
}
/**
* returns those possible matches which I match exactly the last element of
*/
private String[] preMatch(String[] possibleMatches) {
List ret = new ArrayList();
for (int i=0, len=possibleMatches.length; i < len; i++) {
char[][] names = splitNames(possibleMatches[i],true);
if (namePatterns[0].matches(names[names.length-1])) {
ret.add(possibleMatches[i]);
continue;
}
if (possibleMatches[i].indexOf("$") != -1) {
names = splitNames(possibleMatches[i],false);
if (namePatterns[0].matches(names[names.length-1])) {
ret.add(possibleMatches[i]);
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
}
}
}
return (String[])ret.toArray(new String[ret.size()]);
}
}
public String toString() {
StringBuffer buf = new StringBuffer();
if (annotationPattern != AnnotationTypePattern.ANY) {
buf.append('(');
buf.append(annotationPattern.toString());
buf.append(' ');
}
for (int i=0, len=namePatterns.length; i < len; i++) {
NamePattern name = namePatterns[i];
if (name == null) {
buf.append(".");
} else {
if (i > 0) buf.append(".");
buf.append(name.toString());
}
}
if (upperBound != null) {
buf.append(" extends ");
buf.append(upperBound.toString());
}
if (lowerBound != null) {
buf.append(" super ");
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
buf.append(lowerBound.toString());
}
if (typeParameters!=null && typeParameters.size()!=0) {
buf.append("<");
buf.append(typeParameters.toString());
buf.append(">");
}
if (includeSubtypes) buf.append('+');
if (isVarArgs) buf.append("...");
if (annotationPattern != AnnotationTypePattern.ANY) {
buf.append(')');
}
return buf.toString();
}
public boolean equals(Object other) {
if (!(other instanceof WildTypePattern)) return false;
WildTypePattern o = (WildTypePattern)other;
int len = o.namePatterns.length;
if (len != this.namePatterns.length) return false;
if (this.includeSubtypes != o.includeSubtypes) return false;
if (this.dim != o.dim) return false;
if (this.isVarArgs != o.isVarArgs) return false;
if (this.upperBound != null) {
if (o.upperBound == null) return false;
if (!this.upperBound.equals(o.upperBound)) return false;
} else {
if (o.upperBound != null) return false;
}
if (this.lowerBound != null) {
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
if (o.lowerBound == null) return false;
if (!this.lowerBound.equals(o.lowerBound)) return false;
} else {
if (o.lowerBound != null) return false;
}
if (!typeParameters.equals(o.typeParameters)) return false;
for (int i=0; i < len; i++) {
if (!o.namePatterns[i].equals(this.namePatterns[i])) return false;
}
return (o.annotationPattern.equals(this.annotationPattern));
}
public int hashCode() {
int result = 17;
for (int i = 0, len = namePatterns.length; i < len; i++) {
result = 37*result + namePatterns[i].hashCode();
}
result = 37*result + annotationPattern.hashCode();
if (upperBound != null) result = 37*result + upperBound.hashCode();
if (lowerBound != null) result = 37*result + lowerBound.hashCode();
return result;
}
private static final byte VERSION = 1;
/**
* @see org.aspectj.weaver.patterns.PatternNode#write(DataOutputStream)
*/
public void write(DataOutputStream s) throws IOException {
s.writeByte(TypePattern.WILD);
s.writeByte(VERSION);
s.writeShort(namePatterns.length);
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
for (int i = 0; i < namePatterns.length; i++) {
namePatterns[i].write(s);
}
s.writeBoolean(includeSubtypes);
s.writeInt(dim);
s.writeBoolean(isVarArgs);
typeParameters.write(s);
FileUtil.writeStringArray(knownMatches, s);
FileUtil.writeStringArray(importedPrefixes, s);
writeLocation(s);
annotationPattern.write(s);
s.writeBoolean(isGeneric);
s.writeBoolean(upperBound != null);
if (upperBound != null) upperBound.write(s);
s.writeBoolean(lowerBound != null);
if (lowerBound != null) lowerBound.write(s);
s.writeInt(additionalInterfaceBounds == null ? 0 : additionalInterfaceBounds.length);
if (additionalInterfaceBounds != null) {
for (int i = 0; i < additionalInterfaceBounds.length; i++) {
additionalInterfaceBounds[i].write(s);
}
}
}
public static TypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException {
if (s.getMajorVersion()>=AjAttribute.WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ150) {
return readTypePattern150(s,context);
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
} else {
return readTypePatternOldStyle(s,context);
}
}
public static TypePattern readTypePattern150(VersionedDataInputStream s, ISourceContext context) throws IOException {
byte version = s.readByte();
if (version > VERSION) {
throw new BCException("WildTypePattern was written by a more recent version of AspectJ, cannot read");
}
int len = s.readShort();
NamePattern[] namePatterns = new NamePattern[len];
for (int i=0; i < len; i++) {
namePatterns[i] = NamePattern.read(s);
}
boolean includeSubtypes = s.readBoolean();
int dim = s.readInt();
boolean varArg = s.readBoolean();
TypePatternList typeParams = TypePatternList.read(s, context);
WildTypePattern ret = new WildTypePattern(namePatterns, includeSubtypes, dim, varArg,typeParams);
ret.knownMatches = FileUtil.readStringArray(s);
ret.importedPrefixes = FileUtil.readStringArray(s);
ret.readLocation(context, s);
ret.setAnnotationTypePattern(AnnotationTypePattern.read(s,context));
ret.isGeneric = s.readBoolean();
if (s.readBoolean()) {
ret.upperBound = TypePattern.read(s,context);
}
if (s.readBoolean()) {
ret.lowerBound = TypePattern.read(s,context);
|
156,904 |
Bug 156904 Incorrect warning when advising a private method of a private inner class
|
The Eclipse AJDT give an incorrect warning when you want to advise a private method of a private inner class. When I want to advise a private method in a private inner class, like this public class Outer { private class Inner { private void myMethod() } } Using the following poincut: poincut innerpointcut():execution( * Outer.Inner.myMethod() ); and advice: before():innerpointcut() { System.out.println( "executing!" ); } I get a warning "invalidAbsoluteTypeName" next to my pointcut, but next to the advice, there is a marker that points to the private method.
|
resolved fixed
|
782ade2
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-03T15:00:34Z | 2006-09-11T18:40:00Z |
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
|
}
int numIfBounds = s.readInt();
if (numIfBounds > 0) {
ret.additionalInterfaceBounds = new TypePattern[numIfBounds];
for (int i = 0; i < numIfBounds; i++) {
ret.additionalInterfaceBounds[i] = TypePattern.read(s,context);
}
}
return ret;
}
public static TypePattern readTypePatternOldStyle(VersionedDataInputStream s, ISourceContext context) throws IOException {
int len = s.readShort();
NamePattern[] namePatterns = new NamePattern[len];
for (int i=0; i < len; i++) {
namePatterns[i] = NamePattern.read(s);
}
boolean includeSubtypes = s.readBoolean();
int dim = s.readInt();
WildTypePattern ret = new WildTypePattern(namePatterns, includeSubtypes, dim, false,null);
ret.knownMatches = FileUtil.readStringArray(s);
ret.importedPrefixes = FileUtil.readStringArray(s);
ret.readLocation(context, s);
return ret;
}
public Object accept(PatternNodeVisitor visitor, Object data) {
return visitor.visit(this, data);
}
}
|
159,143 |
Bug 159143 subtype pattern not working for declare annotation on method
|
Using AspectJ 1.5.3.200609271036, when declaring an annotation on a method, get unexpected error when using subtype wildcard for the declaring type. E.g., declare @method : void Foo+.foo() : @MethodAnnotation; Error text: "The method 'void Foo+.foo()' does not exist"
|
resolved fixed
|
513564a
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-04T07:27:44Z | 2006-09-28T16:13:20Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
/*******************************************************************************
* Copyright (c) 2006 IBM
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andy Clement - initial API and implementation
*******************************************************************************/
package org.aspectj.systemtest.ajc153;
import java.io.File;
import junit.framework.Test;
import org.aspectj.asm.AsmManager;
import org.aspectj.asm.IHierarchy;
import org.aspectj.asm.IProgramElement;
import org.aspectj.testing.Utils;
import org.aspectj.testing.XMLBasedAjcTestCase;
import org.aspectj.weaver.bcel.Utility;
public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
|
159,143 |
Bug 159143 subtype pattern not working for declare annotation on method
|
Using AspectJ 1.5.3.200609271036, when declaring an annotation on a method, get unexpected error when using subtype wildcard for the declaring type. E.g., declare @method : void Foo+.foo() : @MethodAnnotation; Error text: "The method 'void Foo+.foo()' does not exist"
|
resolved fixed
|
513564a
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-04T07:27:44Z | 2006-09-28T16:13:20Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
public void testVisibilityProblem_pr149071() { runTest("visibility problem");}
public void testMissingLineNumbersInStacktraceAfter_pr145442() { runTest("missing line numbers in stacktrace after");}
public void testMissingLineNumbersInStacktraceAround_pr145442() { runTest("missing line numbers in stacktrace around");}
public void testGenericArrays_pr158624() { runTest("generics and arrays"); }
public void testMissingLineNumbersInStacktraceBefore_pr145442() { runTest("missing line numbers in stacktrace before");}
public void testMissingLineNumbersInStacktraceBefore_pr145442_Binary() { runTest("missing line numbers in stacktrace before - binary");}
public void testAnnotationStylePointcutNPE_pr158412() { runTest("annotation style pointcut npe"); }
public void testAnnotationStylePointcutNPE_pr158412_2() { runTest("annotation style pointcut npe - 2"); }
public void testAnnotationsCallConstructors_pr158126() { runTest("annotations, call and constructors problem");}
public void testIllegalStateExceptionGenerics_pr153845() { runTest("IllegalStateException at GenericSignatureParser.java"); }
public void testNoIllegalStateExceptionFromAsmDelegate_pr153490_1() { runTest("no illegal state exception from AsmDelegate - 1");}
public void testNoIllegalStateExceptionFromAsmDelegate_pr153490_2() { runTest("no illegal state exception from AsmDelegate - 2");}
public void testNoIllegalStateExceptionFromAsmDelegate_pr153490_3() { runTest("no illegal state exception from AsmDelegate - 3");}
public void testAnnotMethod_pr156962() { runTest("Test Annot Method");}
public void testAnnotMethodHasMember_pr156962() { runTest("Test Annot Method Has Member"); }
public void testMixingGenerics_pr152848() { runTest("mixing generics"); }
public void testIncorrectStaticinitializationWeaving_pr149560_1() { runTest("incorrect staticinitialization weaving - codestyle");}
public void testIncorrectStaticinitializationWeaving_pr149560_2() { runTest("incorrect staticinitialization weaving - annstyle");}
public void testIncorrectDeprecatedAnnotationProcessing_pr154332() { runTest("incorrect deprecated annotation processing");}
public void testPipeliningProblemWithAnnotationsDecp_pr153380_1() { runTest("pipelining decps");}
public void testUnwantedPointcutWarning_pr148219() { runTest("unwanted warning for pointcut");}
public void testDecpAndCflowadderMungerClash_pr152631() { runTest("decp and cflowadder munger clash");}
public void testGenericInheritanceDecp_pr150095() { runTest("generics, inheritance and decp");}
public void testIllegalStateException_pr148737() { runTest("illegalstateexception for non generic type");}
public void testAtajInheritance_pr149305_1() { runTest("ataj inheritance - 1");}
|
159,143 |
Bug 159143 subtype pattern not working for declare annotation on method
|
Using AspectJ 1.5.3.200609271036, when declaring an annotation on a method, get unexpected error when using subtype wildcard for the declaring type. E.g., declare @method : void Foo+.foo() : @MethodAnnotation; Error text: "The method 'void Foo+.foo()' does not exist"
|
resolved fixed
|
513564a
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-04T07:27:44Z | 2006-09-28T16:13:20Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
public void testAtajInheritance_pr149305_2() { runTest("ataj inheritance - 2");}
public void testAtajInheritance_pr149305_3() { runTest("ataj inheritance - 3");}
public void testVerificationFailureForAspectOf_pr148693() {
runTest("verification problem");
Utils.verifyClass(ajc,"mypackage.MyAspect");
}
public void testIncorrectAnnotationValue_pr148537() { runTest("incorrect annotation value");}
public void testVerifyErrNoTypeCflowField_pr145693_1() { runTest("verifyErrNoTypeCflowField"); }
public void testVerifyErrInpathNoTypeCflowField_pr145693_2() { runTest("verifyErrInpathNoTypeCflowField"); }
public void testCpathNoTypeCflowField_pr145693_3() { runTest("cpathNoTypeCflowField"); }
public void testGenericSignatures_pr148409() { runTest("generic signature problem"); }
public void testCantFindType_pr149322_01() {runTest("can't find type on interface call 1");}
public void testCantFindType_pr149322_02() {runTest("can't find type on interface call 2");}
public void testCantFindType_pr149322_03() {runTest("can't find type on interface call 3");}
public void testParsingBytecodeLess_pr152871() {
Utility.testingParseCounter=0;
runTest("parsing bytecode less");
assertTrue("Should have called parse 5 times, not "+Utility.testingParseCounter+" times",Utility.testingParseCounter==5);
}
public void testMatchVolatileField_pr150671() {runTest("match volatile field");};
public void testDuplicateJVMTIAgents_pr151938() {runTest("Duplicate JVMTI agents");};
public void testLTWWorldWithAnnotationMatching_pr153572() { runTest("LTWWorld with annotation matching");}
public void testReweavableAspectNotRegistered_pr129525 () {
runTest("reweavableAspectNotRegistered error");
|
159,143 |
Bug 159143 subtype pattern not working for declare annotation on method
|
Using AspectJ 1.5.3.200609271036, when declaring an annotation on a method, get unexpected error when using subtype wildcard for the declaring type. E.g., declare @method : void Foo+.foo() : @MethodAnnotation; Error text: "The method 'void Foo+.foo()' does not exist"
|
resolved fixed
|
513564a
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-04T07:27:44Z | 2006-09-28T16:13:20Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
}
public void testNPEinConstructorSignatureImpl_pr155972 () {
runTest("NPE in ConstructorSignatureImpl");
}
public void testNPEinFieldSignatureImpl_pr155972 () {
runTest("NPE in FieldSignatureImpl");
}
public void testNPEinInitializerSignatureImpl_pr155972 () {
runTest("NPE in InitializerSignatureImpl");
}
public void testLineNumberTableCorrectWithGenericsForEachAndContinue_pr155763() {
runTest("ensure LineNumberTable correct with generics, for each and continue");
}
public void testDeclareSoftDoesntAllowUndeclaredExInAnonInnerClass_pr151772() {
runTest("ensure declare soft doesn't allow undeclared exception in anonymous inner class");
}
public void testDeclareSoftDoesntAllowUndeclaredExInAnonInnerClass_pr151772_2() {
runTest("ensure declare soft doesn't allow undeclared exception in anonymous inner class - 2");
}
public void testDeclareSoftAndInnerClasses_pr125981() {
runTest("declare soft and inner classes");
}
public void testGetSourceSignature_pr148908() {
runTest("ensure getSourceSignature correct with static field");
|
159,143 |
Bug 159143 subtype pattern not working for declare annotation on method
|
Using AspectJ 1.5.3.200609271036, when declaring an annotation on a method, get unexpected error when using subtype wildcard for the declaring type. E.g., declare @method : void Foo+.foo() : @MethodAnnotation; Error text: "The method 'void Foo+.foo()' does not exist"
|
resolved fixed
|
513564a
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-04T07:27:44Z | 2006-09-28T16:13:20Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
IHierarchy top = AsmManager.getDefault().getHierarchy();
IProgramElement ipe = top.findElementForLabel(top.getRoot(),
IProgramElement.Kind.FIELD,"MY_COMPARATOR");
String expected = "static final Comparator MY_COMPARATOR = new Comparator() {\n" +
" public int compare(Object o1, Object o2) {\n" +
" return 0;\n" +
" }\n" +
"};";
assertEquals("expected source signature to be " + expected +
" but found " + ipe.getSourceSignature(),
expected, ipe.getSourceSignature());
}
public void testNPEWithCustomAgent_pr158005() {
runTest("NPE with custom agent");
}
public void testNoInvalidAbsoluteTypeNameWarning_pr156904_1() {runTest("ensure no invalidAbsoluteTypeName when do match - 1");}
public void testNoInvalidAbsoluteTypeNameWarning_pr156904_2() {runTest("ensure no invalidAbsoluteTypeName when do match - 2");}
public void testNoInvalidAbsoluteTypeNameWarning_pr156904_3() {runTest("ensure no invalidAbsoluteTypeName when do match - 3");}
public void testNoInvalidAbsoluteTypeNameWarning_pr156904_4() {runTest("ensure no invalidAbsoluteTypeName when do match - 4");}
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class);
}
protected File getSpecFile() {
return new File("../tests/src/org/aspectj/systemtest/ajc153/ajc153.xml");
}
}
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
/********************************************************************
* Copyright (c) 2006 Contributors. All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http:eclipse.org/legal/epl-v10.html
*
* Contributors: IBM Corporation - initial API and implementation
* Helen Hawkins - initial version
*******************************************************************/
package org.aspectj.systemtest.ajc153;
import java.io.File;
import java.util.Iterator;
import java.util.List;
import junit.framework.Test;
import org.aspectj.asm.AsmManager;
import org.aspectj.asm.IElementHandleProvider;
import org.aspectj.asm.IHierarchy;
import org.aspectj.asm.IProgramElement;
import org.aspectj.asm.internal.JDTLikeHandleProvider;
import org.aspectj.testing.XMLBasedAjcTestCase;
public class JDTLikeHandleProviderTests extends XMLBasedAjcTestCase {
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
IElementHandleProvider handleProvider;
protected void setUp() throws Exception {
super.setUp();
handleProvider = AsmManager.getDefault().getHandleProvider();
AsmManager.getDefault().setHandleProvider(new JDTLikeHandleProvider());
}
protected void tearDown() throws Exception {
super.tearDown();
AsmManager.getDefault().setHandleProvider(handleProvider);
}
public void testMoreThanOneNamedPointcut() {
runTest("More than one named pointcut");
}
public void testAspectHandle() {
runTest("aspect handle");
IHierarchy top = AsmManager.getDefault().getHierarchy();
IProgramElement pe = top.findElementForType("pkg", "A1");
String expected = "<pkg*A1.aj}A1";
String found = pe.getHandleIdentifier();
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
assertEquals("handleIdentifier - expected " + expected + ", but found "
+ found, expected, found);
}
public void testAdviceHandle() {
runTest("advice handle");
compareHandles(IProgramElement.Kind.ADVICE,
"before(): <anonymous pointcut>",
"<pkg*A2.aj}A2&before");
}
public void testPointcutHandle() {
runTest("pointcut handle");
compareHandles(IProgramElement.Kind.POINTCUT,
"p()",
"<pkg*A4.aj}A4+p");
}
public void testGetIPEWithAspectHandle() {
runTest("get IProgramElement with aspect handle");
IHierarchy top = AsmManager.getDefault().getHierarchy();
String handle = "<pkg*A1.aj}A1";
IProgramElement ipe = top.getElement(handle);
assertNotNull("should have found ipe with handle " + handle, ipe);
IProgramElement ipe2 = top.getElement(handle);
assertEquals("should be the same IPE",ipe,ipe2);
}
public void testAdviceHandleWithCrossCutting() {
runTest("advice handle with crosscutting");
compareHandles(IProgramElement.Kind.ADVICE,
"before(): <anonymous pointcut>",
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
"<pkg*A3.aj}A3&before");
}
public void testPointcutHandleWithArgs() {
runTest("pointcut handle with args");
compareHandles(IProgramElement.Kind.POINTCUT,
"p(java.lang.Integer)",
"*A6.aj}A6+p+QInteger;");
}
public void testAdviceHandleWithArgs() {
runTest("advice handle with args");
compareHandles(IProgramElement.Kind.ADVICE,
"afterReturning(java.lang.Integer): p..",
"<pkg*A8.aj}A8&afterReturning&QInteger;");
}
public void testFieldITD() {
runTest("field itd handle");
compareHandles(IProgramElement.Kind.INTER_TYPE_FIELD,
"C.x",
"<pkg*A9.aj}A9)C.x");
}
public void testMethodITD() {
runTest("method itd handle");
compareHandles(IProgramElement.Kind.INTER_TYPE_METHOD,
"C.method()",
"<pkg*A9.aj}A9)C.method");
}
public void testMethodITDWithArgs() {
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
runTest("method itd with args handle");
compareHandles(IProgramElement.Kind.INTER_TYPE_METHOD,
"C.methodWithArgs(int)",
"<pkg*A9.aj}A9)C.methodWithArgs)I");
}
public void testConstructorITDWithArgs() {
runTest("constructor itd with args");
compareHandles(IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR,
"C.C(int,java.lang.String)",
"<pkg*A13.aj}A13)C.C)I)QString;");
}
public void testDeclareParentsHandle() {
runTest("declare parents handle");
compareHandles(IProgramElement.Kind.DECLARE_PARENTS,
"declare parents: implements C2",
"<pkg*A7.aj}A7`declare parents");
}
public void testTwoDeclareParents() {
runTest("two declare parents in same file");
compareHandles(IProgramElement.Kind.DECLARE_PARENTS,
"declare parents: extends C5",
"<pkg*A7.aj}A7`declare parents!2");
}
public void testMethodCallHandle() {
runTest("method call handle");
compareHandles(IProgramElement.Kind.CODE,
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
"method-call(void pkg.C.m2())",
"<pkg*A10.aj[C~m1?method-call(void pkg.C.m2())");
}
public void testDeclareAtType() {
runTest("declare @type");
compareHandles(IProgramElement.Kind.DECLARE_ANNOTATION_AT_TYPE,
"declare @type: pkg.C : @MyAnnotation",
"<pkg*A12.aj}A`declare @type");
}
public void testDeclareAtField() {
runTest("declare @field");
compareHandles(IProgramElement.Kind.DECLARE_ANNOTATION_AT_FIELD,
"declare @field: int pkg.C.someField : @MyAnnotation",
"<pkg*A12.aj}A`declare @field!2");
}
public void testDeclareAtMethod() {
runTest("declare @method");
compareHandles(IProgramElement.Kind.DECLARE_ANNOTATION_AT_METHOD,
"declare @method: public void pkg.C.method1() : @MyAnnotation",
"<pkg*A12.aj}A`declare @method!3");
}
public void testDeclareAtConstructor() {
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
runTest("declare @constructor");
compareHandles(IProgramElement.Kind.DECLARE_ANNOTATION_AT_CONSTRUCTOR,
"declare @constructor: pkg.C.new() : @MyAnnotation",
"<pkg*A12.aj}A`declare @constructor!4");
}
public void testTwoPiecesOfAdviceWithSameSignatureAndPointcut() {
runTest("two pieces of advice with the same signature and pointcut");
IHierarchy top = AsmManager.getDefault().getHierarchy();
IProgramElement parent = top.findElementForLabel(top.getRoot(),
IProgramElement.Kind.ASPECT, "A5");
List children = parent.getChildren();
String handle1 = null;
String handle2 = null;
for (Iterator iter = children.iterator(); iter.hasNext();) {
IProgramElement element = (IProgramElement) iter.next();
if (element.getKind().equals(IProgramElement.Kind.ADVICE)) {
if (handle1 == null) {
handle1 = element.getHandleIdentifier();
} else {
handle2 = element.getHandleIdentifier();
}
}
}
String expected1 = "<pkg*A5.aj}A5&before";
String expected2 = "<pkg*A5.aj}A5&before!2";
boolean b = expected1.equals(handle1);
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
if (b) {
assertEquals("handleIdentifier - expected " + expected2 + ", but found "
+ handle2, expected2, handle2);
} else {
assertEquals("handleIdentifier - expected " + expected1 + ", but found "
+ handle2, expected1, handle2);
assertEquals("handleIdentifier - expected " + expected2 + ", but found "
+ handle1, expected2, handle1);
}
}
public void testDeclareWarningHandle() {
runTest("declare warning handle");
compareHandles(IProgramElement.Kind.DECLARE_WARNING,
"declare warning: \"Illegal call.\"",
"<pkg*A11.aj}A11`declare warning");
}
public void testTwoDeclareWarningHandles() {
runTest("two declare warning handles");
compareHandles(IProgramElement.Kind.DECLARE_WARNING,
"declare warning: \"blah\"",
"<pkg*A11.aj}A11`declare warning!2");
}
public void testTenDeclareWarningHandles() {
runTest("ten declare warning handles");
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
compareHandles(IProgramElement.Kind.DECLARE_WARNING,
"declare warning: \"warning 1\"",
"*DeclareWarnings.aj}DeclareWarnings`declare warning");
compareHandles(IProgramElement.Kind.DECLARE_WARNING,
"declare warning: \"warning 10\"",
"*DeclareWarnings.aj}DeclareWarnings`declare warning!10");
}
public void testIPEsWithSameNameHaveUniqueHandles_methodCall() {
runTest("ipes with same name have unique handles - method-call");
IHierarchy top = AsmManager.getDefault().getHierarchy();
String handle1 = "*TwoMethodCalls.aj[Main~main~\\[QString;?method-call(" +
"void java.io.PrintStream.println(java.lang.String))";
assertNotNull("expected to find node with handle " + handle1
+ ", but did not",top.getElement(handle1));
String handle2 = "*TwoMethodCalls.aj[Main~main~\\[QString;?method-call(" +
"void java.io.PrintStream.println(java.lang.String))!2";
assertNotNull("expected to find node with handle " + handle2
+ ", but did not",top.getElement(handle2));
String handle3 = "*TwoMethodCalls.aj[Main~main~\\[QString;?method-call(" +
"void java.io.PrintStream.println(java.lang.String))!3";
assertNull("expected not to find node with handle " + handle3
+ ", but found one",top.getElement(handle3));
}
public void testIPEsWithDiffNamesDontHaveCounter_methodCall() {
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
runTest("ipes with different names do not have counter - method-call");
IHierarchy top = AsmManager.getDefault().getHierarchy();
String handle1 = "*TwoDiffMethodCalls.aj[Main~main~\\[QString;?method-call(" +
"void java.io.PrintStream.println(java.lang.String))";
assertNotNull("expected to find node with handle " + handle1
+ ", but did not",top.getElement(handle1));
String handle2 = "*TwoDiffMethodCalls.aj[Main~method~\\[QString;?method-call(" +
"void java.io.PrintStream.println(java.lang.String))";
assertNotNull("expected to find node with handle " + handle2
+ ", but did not",top.getElement(handle2));
}
public void testIPEsWithSameNameHaveUniqueHandles_handler() {
runTest("ipes with same name have unique handles - handler");
IHierarchy top = AsmManager.getDefault().getHierarchy();
String handle1 = "*Handler.aj[C~method?exception-handler(void C." +
"<catch>(java.io.FileNotFoundException))";
assertNotNull("expected to find node with handle " + handle1
+ ", but did not",top.getElement(handle1));
String handle2 = "*Handler.aj[C~method?exception-handler(void C." +
"<catch>(java.io.FileNotFoundException))!2";
assertNotNull("expected to find node with handle " + handle2
+ ", but did not",top.getElement(handle2));
}
public void testIPEsWithSameNameHaveUniqueHandles_get() {
runTest("ipes with same name have unique handles - get");
IHierarchy top = AsmManager.getDefault().getHierarchy();
String handle1 = "*Get.aj[C1~method1?field-get(int C1.x)";
assertNotNull("expected to find node with handle " + handle1
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
+ ", but did not",top.getElement(handle1));
String handle2 = "*Get.aj[C1~method1?field-get(int C1.x)!2";
assertNotNull("expected to find node with handle " + handle2
+ ", but did not",top.getElement(handle2));
}
public void testIPEsWithSameNameHaveUniqueHandles_set() {
runTest("ipes with same name have unique handles - set");
IHierarchy top = AsmManager.getDefault().getHierarchy();
String handle1 = "*Set.aj[C1~method?field-set(int C1.x)";
assertNotNull("expected to find node with handle " + handle1
+ ", but did not",top.getElement(handle1));
String handle2 = "*Set.aj[C1~method?field-set(int C1.x)!2";
assertNotNull("expected to find node with handle " + handle2
+ ", but did not",top.getElement(handle2));
}
public void testCompilationUnitSameAsJDT() {
runTest("compilation unit same as jdt");
compareHandles(IProgramElement.Kind.FILE_JAVA,
"Demo.java",
"<tjp{Demo.java");
}
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
public void testClassSameAsJDT() {
runTest("class same as jdt");
compareHandles(IProgramElement.Kind.CLASS,
"C","<pkg{C.java[C");
}
public void testInterfaceSameAsJDT() {
runTest("interface same as jdt");
compareHandles(IProgramElement.Kind.INTERFACE,
"MyInterface","<pkg{C.java[MyInterface");
}
public void testConstructorSameAsJDT() {
runTest("constructor same as jdt");
compareHandles(IProgramElement.Kind.CONSTRUCTOR,
"C()","<pkg{C.java[C~C");
}
public void testConstructorWithArgsSameAsJDT() {
runTest("constructor with args same as jdt");
compareHandles(IProgramElement.Kind.CONSTRUCTOR,
"C(java.lang.String)","<pkg{C.java[C~C~QString;");
}
}
public void testImportDeclarationSameAsJDT() {
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
runTest("import declaration same as jdt");
compareHandles(IProgramElement.Kind.IMPORT_REFERENCE,
"java.io.*",
"<tjp{Demo.java#java.io.*");
}
public void testTypeSameAsJDT() {
runTest("type same as jdt");
IHierarchy top = AsmManager.getDefault().getHierarchy();
IProgramElement pe = top.findElementForType("tjp", "Demo");
String expected = "<tjp{Demo.java[Demo";
String found = pe.getHandleIdentifier();
assertEquals("handleIdentifier - expected " + expected + ", but found "
+ found, expected, found);
}
public void testFieldSameAsJDT() {
runTest("field same as jdt");
compareHandles(IProgramElement.Kind.FIELD,
"d",
"<tjp{Demo.java[Demo^d");
}
public void testInitializationSameAsJDT() {
runTest("initialization same as jdt");
IHierarchy top = AsmManager.getDefault().getHierarchy();
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
IProgramElement parent = top.findElementForLabel(top.getRoot(),
IProgramElement.Kind.CLASS, "Demo");
List children = parent.getChildren();
String handle1 = null;
String handle2 = null;
for (Iterator iter = children.iterator(); iter.hasNext();) {
IProgramElement element = (IProgramElement) iter.next();
if (element.getKind().equals(IProgramElement.Kind.INITIALIZER)) {
if (handle1 == null) {
handle1 = element.getHandleIdentifier();
} else {
handle2 = element.getHandleIdentifier();
}
}
}
String expected1 = "<tjp{Demo.java[Demo|1";
String expected2 = "<tjp{Demo.java[Demo|2";
boolean b = expected1.equals(handle1);
System.err.println("actual: " + handle1);
System.err.println("actual: " + handle2);
if (b) {
assertEquals("handleIdentifier - expected " + expected2 + ", but found "
+ handle2, expected2, handle2);
} else {
assertEquals("handleIdentifier - expected " + expected1 + ", but found "
+ handle2, expected1, handle2);
assertEquals("handleIdentifier - expected " + expected2 + ", but found "
+ handle1, expected2, handle1);
}
}
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
public void testMethodWithStringArrayArgsSameAsJDT() {
runTest("method with string array as argument same as jdt");
compareHandles(IProgramElement.Kind.METHOD,
"main(java.lang.String[])",
"<tjp{Demo.java[Demo~main~\\[QString;");
}
public void testMethodWithIntArrayArgsSameAsJDT() {
runTest("method with int array as argument same as jdt");
compareHandles(IProgramElement.Kind.METHOD,
"m(int[])",
"<tjp{Demo.java[Demo~m~\\[I");
}
public void testMethodWithNoArgsSameAsJDT() {
runTest("method with no args same as jdt");
compareHandles(IProgramElement.Kind.METHOD,
"go()",
"<tjp{Demo.java[Demo~go");
}
public void testMethodWithTwoArgsSameAsJDT() {
runTest("method with two args same as jdt");
compareHandles(IProgramElement.Kind.METHOD,
"foo(int,java.lang.Object)",
"<tjp{Demo.java[Demo~foo~I~QObject;");
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
}
public void testMethodWithTwoStringArgsSameAsJDT() {
runTest("method with two string args same as jdt");
compareHandles(IProgramElement.Kind.METHOD,
"m2(java.lang.String,java.lang.String)",
"<tjp{Demo.java[Demo~m2~QString;~QString;");
}
public void testEnumSameAsJDT() {
runTest("enum same as jdt");
IHierarchy top = AsmManager.getDefault().getHierarchy();
IProgramElement pe = top.findElementForType("pkg", "E");
String expected = "<pkg{E.java[E";
String found = pe.getHandleIdentifier();
assertEquals("handleIdentifier - expected " + expected + ", but found "
+ found, expected, found);
}
public void testEnumValueSameAsJDT() {
runTest("enum value same as jdt");
compareHandles(IProgramElement.Kind.ENUM_VALUE,
"A","<pkg{E.java[E^A");
}
public void testAnnotationSameAsJDT() {
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
runTest("annotation same as jdt");
IHierarchy top = AsmManager.getDefault().getHierarchy();
IProgramElement pe = top.findElementForType("pkg", "MyAnnotation");
String expected = "<pkg{MyAnnotation.java[MyAnnotation";
String found = pe.getHandleIdentifier();
assertEquals("handleIdentifier - expected " + expected + ", but found "
+ found, expected, found);
}
public void testMethodWithListArgSameAsJDT() {
runTest("method with list arg same as jdt");
compareHandles(IProgramElement.Kind.METHOD,
"method2(java.util.List)",
"<pkg{Java5Class.java[Java5Class~method2~QList;");
}
public void testMethodWithGenericArgSameAsJDT() {
runTest("method with generic arg same as jdt");
compareHandles(IProgramElement.Kind.METHOD,
"genericMethod1(java.util.List<java.lang.String>)",
"<pkg{Java5Class.java[Java5Class~genericMethod1~QList\\<QString;>;");
}
public void testMethodWithTwoGenericArgsSameAsJDT() {
runTest("method with two generic args same as jdt");
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
compareHandles(IProgramElement.Kind.METHOD,
"genericMethod2(java.util.List<java.lang.String>,"
+"pkg.MyGenericClass<java.lang.Integer>)",
"<pkg{Java5Class.java[Java5Class~genericMethod2~QList"
+"\\<QString;>;~QMyGenericClass\\<QInteger;>;");
}
public void testMethodWithTwoTypeParametersSameAsJDT() {
runTest("method with two type parameters same as jdt");
compareHandles(IProgramElement.Kind.METHOD,
"genericMethod4(pkg.MyGenericClass2<java.lang.String,java.lang.Integer>)",
"<pkg{Java5Class.java[Java5Class~genericMethod4" +
"~QMyGenericClass2\\<QString;QInteger;>;");
}
public void testMethodWithTwoArgsSameAsJDT_2() {
runTest("method with two args one of which is generic same as jdt");
compareHandles(IProgramElement.Kind.METHOD,
"genericMethod3(int,java.util.List<java.lang.String>)",
"<pkg{Java5Class.java[Java5Class~genericMethod3~I~QList\\<QString;>;");
}
/*
* Still to do;
* PROJECT,
PACKAGE,
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
|
FILE,
FILE_ASPECTJ,
FILE_LST,
DECLARE_ERROR,
DECLARE_SOFT,
DECLARE_PRECEDENCE,
*/
private void compareHandles(IProgramElement.Kind kind, String ipeName, String expectedHandle) {
IHierarchy top = AsmManager.getDefault().getHierarchy();
IProgramElement pe = top.findElementForLabel(top.getRoot(),kind,ipeName);
String found = pe.getHandleIdentifier();
System.err.println("expected: " + expectedHandle);
System.err.println("actual: " + found);
assertEquals("handleIdentifier - expected " + expectedHandle + ", but found "
+ found, expectedHandle, found);
}
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(JDTLikeHandleProviderTests.class);
}
protected File getSpecFile() {
return new File(
"../tests/src/org/aspectj/systemtest/ajc153/jdtlikehandleprovider.xml");
}
}
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/ShadowMunger.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.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
import org.aspectj.asm.AsmManager;
import org.aspectj.asm.IProgramElement;
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/ShadowMunger.java
|
import org.aspectj.asm.internal.ProgramElement;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.bridge.SourceLocation;
import org.aspectj.util.PartialOrder;
import org.aspectj.weaver.bcel.BcelAdvice;
import org.aspectj.weaver.patterns.DeclareErrorOrWarning;
import org.aspectj.weaver.patterns.PerClause;
import org.aspectj.weaver.patterns.Pointcut;
/**
* For every shadow munger, nothing can be done with it until it is concretized. Then...
*
* (Then we call fast match.)
*
* For every shadow munger, for every shadow,
* first match is called,
* then (if match returned true) the shadow munger is specialized for the shadow,
* which may modify state.
* Then implement is called.
*/
public abstract class ShadowMunger implements PartialOrder.PartialComparable, IHasPosition {
protected Pointcut pointcut;
protected int start, end;
protected ISourceContext sourceContext;
private ISourceLocation sourceLocation;
private ISourceLocation binarySourceLocation;
private File binaryFile;
private String handle = null;
private ResolvedType declaringType;
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/ShadowMunger.java
|
public ShadowMunger(Pointcut pointcut, int start, int end, ISourceContext sourceContext) {
this.pointcut = pointcut;
this.start = start;
this.end = end;
this.sourceContext = sourceContext;
}
public abstract ShadowMunger concretize(ResolvedType fromType, World world, PerClause clause);
public abstract void specializeOn(Shadow shadow);
public abstract void implementOn(Shadow shadow);
/**
* All overriding methods should call super
*/
public boolean match(Shadow shadow, World world) {
return pointcut.match(shadow).maybeTrue();
}
public abstract ShadowMunger parameterizeWith(ResolvedType declaringType,Map typeVariableMap);
public int fallbackCompareTo(Object other) {
return toString().compareTo(toString());
}
public int getEnd() {
return end;
}
public int getStart() {
return start;
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/ShadowMunger.java
|
}
public ISourceLocation getSourceLocation() {
if (sourceLocation == null) {
if (sourceContext != null) {
sourceLocation = sourceContext.makeSourceLocation(this);
}
}
if (isBinary()) {
if (binarySourceLocation == null) {
binarySourceLocation = getBinarySourceLocation(sourceLocation);
}
return binarySourceLocation;
}
return sourceLocation;
}
public String getHandle() {
if (null == handle) {
ISourceLocation sl = getSourceLocation();
if (sl != null) {
IProgramElement ipe = AsmManager.getDefault().getHierarchy().findElementForSourceLine(sl);
handle = AsmManager.getDefault().getHandleProvider().createHandleIdentifier(ipe);
}
}
return handle;
}
public static final ShadowMunger[] NONE = new ShadowMunger[0];
public Pointcut getPointcut() {
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/ShadowMunger.java
|
return pointcut;
}
public void setPointcut(Pointcut pointcut) {
this.pointcut = pointcut;
}
/**
* Invoked when the shadow munger of a resolved type are processed.
* @param aType
*/
public void setDeclaringType(ResolvedType aType) {
this.declaringType = aType;
}
public ResolvedType getDeclaringType() {
return this.declaringType;
}
/**
* @return a Collection of ResolvedType for all checked exceptions that
* might be thrown by this munger
*/
public abstract Collection getThrownExceptions();
/**
* Does the munger has to check that its exception are accepted by the shadow ?
* ATAJ: It s not the case for @AJ around advice f.e. that can throw Throwable, even if the advised
* method does not throw any exceptions.
* @return true if munger has to check that its exceptions can be throwned based on the shadow
*/
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/ShadowMunger.java
|
public abstract boolean mustCheckExceptions();
/**
* Returns the ResolvedType corresponding to the aspect in which this
* shadowMunger is declared. This is different for deow's and advice.
*/
public abstract ResolvedType getResolvedDeclaringAspect();
/**
* Creates the hierarchy for binary aspects
*/
public void createHierarchy() {
if (!isBinary()) return;
IProgramElement sourceFileNode = AsmManager.getDefault().getHierarchy().findElementForSourceLine(getSourceLocation());
if (!sourceFileNode.getKind().equals(IProgramElement.Kind.FILE_JAVA)) {
return;
}
ResolvedType aspect = getResolvedDeclaringAspect();
IProgramElement classFileNode = new ProgramElement(
sourceFileNode.getName() + " (binary)",
IProgramElement.Kind.CLASS,
getBinarySourceLocation(aspect.getSourceLocation()),
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/ShadowMunger.java
|
0,null,null);
IProgramElement root = AsmManager.getDefault().getHierarchy().getRoot();
if (aspect.getPackageName() != null) {
IProgramElement pkgNode = AsmManager.getDefault().getHierarchy().findElementForLabel(
root,IProgramElement.Kind.PACKAGE,aspect.getPackageName());
if (pkgNode == null) {
pkgNode = new ProgramElement(
aspect.getPackageName(),
IProgramElement.Kind.PACKAGE,
new ArrayList());
root.addChild(pkgNode);
pkgNode.addChild(classFileNode);
} else {
pkgNode.addChild(classFileNode);
for (Iterator iter = pkgNode.getChildren().iterator(); iter.hasNext();) {
IProgramElement element = (IProgramElement) iter.next();
if (!element.equals(classFileNode) &&
element.getHandleIdentifier().equals(
classFileNode.getHandleIdentifier())) {
pkgNode.removeChild(classFileNode);
return;
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/ShadowMunger.java
|
}
}
}
} else {
root.addChild(classFileNode);
for (Iterator iter = root.getChildren().iterator(); iter.hasNext();) {
IProgramElement element = (IProgramElement) iter.next();
if (!element.equals(classFileNode) &&
element.getHandleIdentifier().equals(
classFileNode.getHandleIdentifier())) {
root.removeChild(classFileNode);
return;
}
}
}
classFileNode.addChild(new ProgramElement(
"import declarations",
IProgramElement.Kind.IMPORT_REFERENCE,
null,0,null,null));
IProgramElement aspectNode = new ProgramElement(
aspect.getSimpleName(),
IProgramElement.Kind.ASPECT,
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/ShadowMunger.java
|
getBinarySourceLocation(aspect.getSourceLocation()),
aspect.getModifiers(),
null,null);
classFileNode.addChild(aspectNode);
addChildNodes(aspectNode,aspect.getDeclaredPointcuts());
addChildNodes(aspectNode,aspect.getDeclaredAdvice());
addChildNodes(aspectNode,aspect.getDeclares());
}
private void addChildNodes(IProgramElement parent,ResolvedMember[] children) {
for (int i = 0; i < children.length; i++) {
ResolvedMember pcd = children[i];
if (pcd instanceof ResolvedPointcutDefinition) {
ResolvedPointcutDefinition rpcd = (ResolvedPointcutDefinition)pcd;
parent.addChild(new ProgramElement(
pcd.getName(),
IProgramElement.Kind.POINTCUT,
getBinarySourceLocation(rpcd.getPointcut().getSourceLocation()),
pcd.getModifiers(),
null,
Collections.EMPTY_LIST));
}
}
}
private void addChildNodes(IProgramElement parent, Collection children) {
for (Iterator iter = children.iterator(); iter.hasNext();) {
Object element = (Object) iter.next();
if (element instanceof DeclareErrorOrWarning) {
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/ShadowMunger.java
|
DeclareErrorOrWarning decl = (DeclareErrorOrWarning)element;
IProgramElement deowNode = new ProgramElement(
decl.isError() ? "declare error" : "declare warning",
decl.isError() ? IProgramElement.Kind.DECLARE_ERROR : IProgramElement.Kind.DECLARE_WARNING,
getBinarySourceLocation(decl.getSourceLocation()),
decl.getDeclaringType().getModifiers(),
null,null);
deowNode.setDetails("\"" + AsmRelationshipUtils.genDeclareMessage(decl.getMessage()) + "\"");
parent.addChild(deowNode);
} else if (element instanceof BcelAdvice) {
BcelAdvice advice = (BcelAdvice)element;
IProgramElement adviceNode = new ProgramElement(
advice.kind.getName(),
IProgramElement.Kind.ADVICE,
getBinarySourceLocation(advice.getSourceLocation()),
advice.signature.getModifiers(),null,Collections.EMPTY_LIST);
adviceNode.setDetails(AsmRelationshipUtils.genPointcutDetails(advice.getPointcut()));
parent.addChild(adviceNode);
}
}
}
/**
* Returns the binarySourceLocation for the given sourcelocation. This
* isn't cached because it's used when faulting in the binary nodes
* and is called with ISourceLocations for all advice, pointcuts and deows
* contained within the resolvedDeclaringAspect.
*/
private ISourceLocation getBinarySourceLocation(ISourceLocation sl) {
if (sl == null) return null;
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/ShadowMunger.java
|
String sourceFileName = null;
if (getResolvedDeclaringAspect() instanceof ReferenceType) {
String s = ((ReferenceType)getResolvedDeclaringAspect()).getDelegate().getSourcefilename();
int i = s.lastIndexOf('/');
if (i != -1) {
sourceFileName = s.substring(i+1);
} else {
sourceFileName = s;
}
}
ISourceLocation sLoc = new SourceLocation(
getBinaryFile(),
sl.getLine(),
sl.getEndLine(),
((sl.getColumn() == 0) ? ISourceLocation.NO_COLUMN : sl.getColumn()),
sl.getContext(),
sourceFileName);
return sLoc;
}
/**
* Returns the File with pathname to the class file, for example either
* C:\temp\ajcSandbox\workspace\ajcTest16957.tmp\simple.jar!pkg\BinaryAspect.class
* if the class file is in a jar file, or
* C:\temp\ajcSandbox\workspace\ajcTest16957.tmp!pkg\BinaryAspect.class
* if the class file is in a directory
*/
private File getBinaryFile() {
if (binaryFile == null) {
String s = getResolvedDeclaringAspect().getBinaryPath();
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/ShadowMunger.java
|
File f = getResolvedDeclaringAspect().getSourceLocation().getSourceFile();
int i = f.getPath().lastIndexOf('.');
String path = f.getPath().substring(0,i) + ".class";
binaryFile = new File(s + "!" + path);
}
return binaryFile;
}
/**
* Returns whether or not this shadow munger came from
* a binary aspect - keep a record of whether or not we've
* checked if we're binary otherwise we keep caluclating the
* same thing many times
*/
protected boolean isBinary() {
if (!checkedIsBinary) {
ResolvedType rt = getResolvedDeclaringAspect();
if (rt != null) {
isBinary = ((rt.getBinaryPath() == null) ? false : true);
}
checkedIsBinary = true;
}
return isBinary;
}
private boolean isBinary;
private boolean checkedIsBinary;
}
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/patterns/DeclareErrorOrWarning.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.patterns;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Map;
import org.aspectj.weaver.ISourceContext;
import org.aspectj.weaver.VersionedDataInputStream;
public class DeclareErrorOrWarning extends Declare {
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/patterns/DeclareErrorOrWarning.java
|
private boolean isError;
private Pointcut pointcut;
private String message;
public DeclareErrorOrWarning(boolean isError, Pointcut pointcut, String message) {
this.isError = isError;
this.pointcut = pointcut;
this.message = message;
}
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("declare ");
if (isError) buf.append("error: ");
else buf.append("warning: ");
buf.append(pointcut);
buf.append(": ");
buf.append("\"");
buf.append(message);
buf.append("\";");
return buf.toString();
}
public boolean equals(Object other) {
if (!(other instanceof DeclareErrorOrWarning)) return false;
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/patterns/DeclareErrorOrWarning.java
|
DeclareErrorOrWarning o = (DeclareErrorOrWarning)other;
return (o.isError == isError) &&
o.pointcut.equals(pointcut) &&
o.message.equals(message);
}
public int hashCode() {
int result = isError ? 19 : 23;
result = 37*result + pointcut.hashCode();
result = 37*result + message.hashCode();
return result;
}
public Object accept(PatternNodeVisitor visitor, Object data) {
return visitor.visit(this,data);
}
public void write(DataOutputStream s) throws IOException {
s.writeByte(Declare.ERROR_OR_WARNING);
s.writeBoolean(isError);
pointcut.write(s);
s.writeUTF(message);
writeLocation(s);
}
public static Declare read(VersionedDataInputStream s, ISourceContext context) throws IOException {
Declare ret = new DeclareErrorOrWarning(
s.readBoolean(),
Pointcut.read(s, context),
s.readUTF()
);
ret.readLocation(context, s);
|
159,896 |
Bug 159896 advice from injars do not have unique handles with the JDTLikeHandleProvider
|
Advice of the same kind contained in the same aspect currently do not have unique handles if the aspect is on the aspectpath.
|
resolved fixed
|
d532892
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-06T16:29:03Z | 2006-10-05T14:53:20Z |
weaver/src/org/aspectj/weaver/patterns/DeclareErrorOrWarning.java
|
return ret;
}
public boolean isError() {
return isError;
}
public String getMessage() {
return message;
}
public Pointcut getPointcut() {
return pointcut;
}
public void resolve(IScope scope) {
pointcut = pointcut.resolve(scope);
}
public Declare parameterizeWith(Map typeVariableBindingMap) {
Declare ret = new DeclareErrorOrWarning(isError,pointcut.parameterizeWith(typeVariableBindingMap),message);
ret.copyLocationFrom(this);
return ret;
}
public boolean isAdviceLike() {
return true;
}
public String getNameSuffix() {
return "eow";
}
}
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.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.ajdt.internal.core.builder;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.jar.Attributes;
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
import java.util.jar.JarFile;
import java.util.jar.JarInputStream;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
import java.util.zip.ZipEntry;
import org.aspectj.ajdt.internal.compiler.AjCompilerAdapter;
import org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter;
import org.aspectj.ajdt.internal.compiler.IBinarySourceProvider;
import org.aspectj.ajdt.internal.compiler.ICompilerAdapter;
import org.aspectj.ajdt.internal.compiler.ICompilerAdapterFactory;
import org.aspectj.ajdt.internal.compiler.IIntermediateResultsRequestor;
import org.aspectj.ajdt.internal.compiler.IOutputClassFileNameProvider;
import org.aspectj.ajdt.internal.compiler.InterimCompilationResult;
import org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment;
import org.aspectj.ajdt.internal.compiler.lookup.AnonymousClassPublisher;
import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
import org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter;
import org.aspectj.asm.AsmManager;
import org.aspectj.asm.IHierarchy;
import org.aspectj.asm.IProgramElement;
import org.aspectj.asm.internal.ProgramElement;
import org.aspectj.bridge.AbortException;
import org.aspectj.bridge.CountingMessageHandler;
import org.aspectj.bridge.ILifecycleAware;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.IProgressListener;
import org.aspectj.bridge.Message;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.bridge.SourceLocation;
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
import org.aspectj.bridge.Version;
import org.aspectj.bridge.context.CompilationAndWeavingContext;
import org.aspectj.bridge.context.ContextFormatter;
import org.aspectj.bridge.context.ContextToken;
import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
import org.aspectj.org.eclipse.jdt.core.compiler.IProblem;
import org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile;
import org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult;
import org.aspectj.org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies;
import org.aspectj.org.eclipse.jdt.internal.compiler.ICompilerRequestor;
import org.aspectj.org.eclipse.jdt.internal.compiler.IProblemFactory;
import org.aspectj.org.eclipse.jdt.internal.compiler.batch.ClasspathDirectory;
import org.aspectj.org.eclipse.jdt.internal.compiler.batch.CompilationUnit;
import org.aspectj.org.eclipse.jdt.internal.compiler.batch.FileSystem;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.INameEnvironment;
import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser;
import org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
import org.aspectj.org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
import org.aspectj.tools.ajc.Main;
import org.aspectj.util.FileUtil;
import org.aspectj.weaver.Dump;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.World;
import org.aspectj.weaver.bcel.BcelWeaver;
import org.aspectj.weaver.bcel.BcelWorld;
import org.aspectj.weaver.bcel.UnwovenClassFile;
import org.eclipse.core.runtime.OperationCanceledException;
public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourceProvider,ICompilerAdapterFactory {
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
private static final String CROSSREFS_FILE_NAME = "build.lst";
private static final String CANT_WRITE_RESULT = "unable to write compilation result";
private static final String MANIFEST_NAME = "META-INF/MANIFEST.MF";
static final boolean COPY_INPATH_DIR_RESOURCES = false;
private static boolean DO_RUNTIME_VERSION_CHECK = false;
static final boolean FAIL_IF_RUNTIME_NOT_FOUND = false;
private static final FileFilter binarySourceFilter =
new FileFilter() {
public boolean accept(File f) {
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
return f.getName().endsWith(".class");
}};
/**
* This builder is static so that it can be subclassed and reset. However, note
* that there is only one builder present, so if two extendsion reset it, only
* the latter will get used.
*/
public static AsmHierarchyBuilder asmHierarchyBuilder = new AsmHierarchyBuilder();
static {
CompilationAndWeavingContext.registerFormatter(
CompilationAndWeavingContext.BATCH_BUILD, new AjBuildContexFormatter());
CompilationAndWeavingContext.registerFormatter(
CompilationAndWeavingContext.INCREMENTAL_BUILD, new AjBuildContexFormatter());
}
private IProgressListener progressListener = null;
private boolean environmentSupportsIncrementalCompilation = false;
private int compiledCount;
private int sourceFileCount;
private JarOutputStream zos;
private boolean batchCompile = true;
private INameEnvironment environment;
private Map binarySourcesForTheNextCompile = new HashMap();
private IHierarchy structureModel;
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
public AjBuildConfig buildConfig;
private boolean ignoreOutxml;
private boolean wasFullBuild = true;
AjState state = new AjState(this);
/**
* Enable check for runtime version, used only by Ant/command-line Main.
* @param main Main unused except to limit to non-null clients.
*/
public static void enableRuntimeVersionCheck(Main caller) {
DO_RUNTIME_VERSION_CHECK = null != caller;
}
public BcelWeaver getWeaver() { return state.getWeaver();}
public BcelWorld getBcelWorld() { return state.getBcelWorld();}
public CountingMessageHandler handler;
public AjBuildManager(IMessageHandler holder) {
super();
this.handler = CountingMessageHandler.makeCountingMessageHandler(holder);
}
public void environmentSupportsIncrementalCompilation(boolean itDoes) {
this.environmentSupportsIncrementalCompilation = itDoes;
}
public boolean doGenerateModel() {
return buildConfig.isGenerateModelMode();
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
}
public boolean batchBuild(
AjBuildConfig buildConfig,
IMessageHandler baseHandler)
throws IOException, AbortException {
return doBuild(buildConfig, baseHandler, true);
}
public boolean incrementalBuild(
AjBuildConfig buildConfig,
IMessageHandler baseHandler)
throws IOException, AbortException {
return doBuild(buildConfig, baseHandler, false);
}
protected boolean doBuild(
AjBuildConfig buildConfig,
IMessageHandler baseHandler,
boolean batch) throws IOException, AbortException {
boolean ret = true;
batchCompile = batch;
wasFullBuild = batch;
if (baseHandler instanceof ILifecycleAware) {
((ILifecycleAware)baseHandler).buildStarting(!batch);
}
CompilationAndWeavingContext.reset();
int phase = batch ? CompilationAndWeavingContext.BATCH_BUILD : CompilationAndWeavingContext.INCREMENTAL_BUILD;
ContextToken ct = CompilationAndWeavingContext.enteringPhase(phase ,buildConfig);
try {
if (batch) {
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
this.state = new AjState(this);
}
this.state.setCouldBeSubsequentIncrementalBuild(this.environmentSupportsIncrementalCompilation);
boolean canIncremental = state.prepareForNextBuild(buildConfig);
if (!canIncremental && !batch) {
CompilationAndWeavingContext.leavingPhase(ct);
if (state.listenerDefined()) state.getListener().recordDecision("Falling back to batch compilation");
return doBuild(buildConfig, baseHandler, true);
}
this.handler =
CountingMessageHandler.makeCountingMessageHandler(baseHandler);
if (DO_RUNTIME_VERSION_CHECK) {
String check = checkRtJar(buildConfig);
if (check != null) {
if (FAIL_IF_RUNTIME_NOT_FOUND) {
MessageUtil.error(handler, check);
CompilationAndWeavingContext.leavingPhase(ct);
return false;
} else {
MessageUtil.warn(handler, check);
}
}
}
setBuildConfig(buildConfig);
}
if (batch || !AsmManager.attemptIncrementalModelRepairs) {
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
setupModel(buildConfig);
}
if (batch) {
initBcelWorld(handler);
}
if (handler.hasErrors()) {
CompilationAndWeavingContext.leavingPhase(ct);
return false;
}
if (buildConfig.getOutputJar() != null) {
if (!openOutputStream(buildConfig.getOutputJar())) {
CompilationAndWeavingContext.leavingPhase(ct);
return false;
}
}
if (batch) {
if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) {
getWorld().setModel(AsmManager.getDefault().getHierarchy());
}
binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(true);
performCompilation(buildConfig.getFiles());
state.clearBinarySourceFiles();
if (handler.hasErrors()) {
CompilationAndWeavingContext.leavingPhase(ct);
if (AsmManager.isReporting())
AsmManager.getDefault().reportModelInfo("After a failed batch build");
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
return false;
}
if (AsmManager.isReporting())
AsmManager.getDefault().reportModelInfo("After a batch build");
} else {
binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(true);
List files = state.getFilesToCompile(true);
if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode())
if (AsmManager.attemptIncrementalModelRepairs)
AsmManager.getDefault().processDelta(files,state.getAddedFiles(),state.getDeletedFiles());
boolean hereWeGoAgain = !(files.isEmpty() && binarySourcesForTheNextCompile.isEmpty());
for (int i = 0; (i < 5) && hereWeGoAgain; i++) {
if (state.listenerDefined())
state.getListener().recordInformation("Starting incremental compilation loop "+(i+1)+" of possibly 5");
performCompilation(files);
if (handler.hasErrors() || (progressListener!=null && progressListener.isCancelledRequested())) {
CompilationAndWeavingContext.leavingPhase(ct);
return false;
}
if (state.requiresFullBatchBuild()) {
if (state.listenerDefined())
state.getListener().recordInformation(" Dropping back to full build");
return batchBuild(buildConfig, baseHandler);
}
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(false);
files = state.getFilesToCompile(false);
hereWeGoAgain = !(files.isEmpty() && binarySourcesForTheNextCompile.isEmpty());
if (hereWeGoAgain) {
if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode())
if (AsmManager.attemptIncrementalModelRepairs)
AsmManager.getDefault().processDelta(files,state.getAddedFiles(),state.getDeletedFiles());
}
}
if (!files.isEmpty()) {
CompilationAndWeavingContext.leavingPhase(ct);
return batchBuild(buildConfig, baseHandler);
} else {
if (AsmManager.isReporting())
AsmManager.getDefault().reportModelInfo("After an incremental build");
}
}
if (buildConfig.isEmacsSymMode()) {
new org.aspectj.ajdt.internal.core.builder.EmacsStructureModelManager().externalizeModel();
}
if (buildConfig.isGenerateCrossRefsMode()) {
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
String configFileProxy = buildConfig.getOutputDir().getAbsolutePath()
+ File.separator
+ CROSSREFS_FILE_NAME;
AsmManager.getDefault().writeStructureModel(configFileProxy);
}
state.successfulCompile(buildConfig,batch);
copyResourcesToDestination();
if (buildConfig.getOutxmlName() != null) {
writeOutxmlFile();
}
if (buildConfig.isGenerateModelMode()) {
AsmManager.getDefault().fireModelUpdated();
}
CompilationAndWeavingContext.leavingPhase(ct);
} finally {
if (baseHandler instanceof ILifecycleAware) {
((ILifecycleAware)baseHandler).buildFinished(!batch);
}
if (zos != null) {
closeOutputStream(buildConfig.getOutputJar());
}
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
ret = !handler.hasErrors();
if (getBcelWorld()!=null) getBcelWorld().tidyUp();
if (getWeaver()!=null) getWeaver().tidyUp();
}
return ret;
}
private String stringifyList(List l) {
if (l==null) return "";
StringBuffer sb = new StringBuffer();
sb.append("{");
for (Iterator iter = l.iterator(); iter.hasNext();) {
Object el = (Object) iter.next();
sb.append(el);
if (iter.hasNext()) sb.append(",");
}
sb.append("}");
return sb.toString();
}
private boolean openOutputStream(File outJar) {
try {
OutputStream os = FileUtil.makeOutputStream(buildConfig.getOutputJar());
zos = new JarOutputStream(os,getWeaver().getManifest(true));
} catch (IOException ex) {
IMessage message =
new Message("Unable to open outjar "
+ outJar.getPath()
+ "(" + ex.getMessage()
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
+ ")",
new SourceLocation(outJar,0),
true);
handler.handleMessage(message);
return false;
}
return true;
}
private void closeOutputStream(File outJar) {
try {
if (zos != null) zos.close();
zos = null;
if (handler.hasErrors()) {
outJar.delete();
}
} catch (IOException ex) {
IMessage message =
new Message("Unable to write outjar "
+ outJar.getPath()
+ "(" + ex.getMessage()
+ ")",
new SourceLocation(outJar,0),
true);
handler.handleMessage(message);
}
}
private void copyResourcesToDestination() throws IOException {
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
for (Iterator i = buildConfig.getInJars().iterator(); i.hasNext(); ) {
File inJar = (File)i.next();
copyResourcesFromJarFile(inJar);
}
for (Iterator i = buildConfig.getInpath().iterator(); i.hasNext(); ) {
File inPathElement = (File)i.next();
if (inPathElement.isDirectory()) {
copyResourcesFromDirectory(inPathElement);
} else {
copyResourcesFromJarFile(inPathElement);
}
}
if (buildConfig.getSourcePathResources() != null) {
for (Iterator i = buildConfig.getSourcePathResources().keySet().iterator(); i.hasNext(); ) {
String resource = (String)i.next();
File from = (File)buildConfig.getSourcePathResources().get(resource);
copyResourcesFromFile(from,resource,from);
}
}
writeManifest();
}
private void copyResourcesFromJarFile(File jarFile) throws IOException {
JarInputStream inStream = null;
try {
inStream = new JarInputStream(new FileInputStream(jarFile));
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
while (true) {
ZipEntry entry = inStream.getNextEntry();
if (entry == null) break;
String filename = entry.getName();
if (!entry.isDirectory() && acceptResource(filename)) {
byte[] bytes = FileUtil.readAsByteArray(inStream);
writeResource(filename,bytes,jarFile);
}
inStream.closeEntry();
}
} finally {
if (inStream != null) inStream.close();
}
}
private void copyResourcesFromDirectory(File dir) throws IOException {
if (!COPY_INPATH_DIR_RESOURCES) return;
File[] files = FileUtil.listFiles(dir,new FileFilter() {
public boolean accept(File f) {
boolean accept = !(f.isDirectory() || f.getName().endsWith(".class")) ;
return accept;
}
});
for (int i = 0; i < files.length; i++) {
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
String filename = files[i].getAbsolutePath().substring(
dir.getAbsolutePath().length()+1);
copyResourcesFromFile(files[i],filename,dir);
}
}
private void copyResourcesFromFile(File f,String filename,File src) throws IOException {
if (!acceptResource(filename)) return;
FileInputStream fis = null;
try {
fis = new FileInputStream(f);
byte[] bytes = FileUtil.readAsByteArray(fis);
writeResource(filename,bytes,src);
} finally {
if (fis != null) fis.close();
}
}
private void writeResource(String filename, byte[] content, File srcLocation) throws IOException {
if (state.hasResource(filename)) {
IMessage msg = new Message("duplicate resource: '" + filename + "'",
IMessage.WARNING,
null,
new SourceLocation(srcLocation,0));
handler.handleMessage(msg);
return;
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
}
if (filename.equals(buildConfig.getOutxmlName())) {
ignoreOutxml = true;
IMessage msg = new Message("-outxml/-outxmlfile option ignored because resource already exists: '" + filename + "'",
IMessage.WARNING,
null,
new SourceLocation(srcLocation,0));
handler.handleMessage(msg);
}
if (zos != null) {
ZipEntry newEntry = new ZipEntry(filename);
zos.putNextEntry(newEntry);
zos.write(content);
zos.closeEntry();
} else {
File destDir = buildConfig.getOutputDir();
if (buildConfig.getCompilationResultDestinationManager() != null) {
destDir = buildConfig.getCompilationResultDestinationManager().getOutputLocationForResource(srcLocation);
}
try {
OutputStream fos =
FileUtil.makeOutputStream(new File(destDir,filename));
fos.write(content);
fos.close();
} catch (FileNotFoundException fnfe) {
IMessage msg = new Message("unable to copy resource to output folder: '" + filename + "' - reason: "+fnfe.getMessage(),
IMessage.ERROR,
null,
new SourceLocation(srcLocation,0));
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
handler.handleMessage(msg);
}
}
state.recordResource(filename);
}
/*
* If we are writing to an output directory copy the manifest but only
* if we already have one
*/
private void writeManifest () throws IOException {
Manifest manifest = getWeaver().getManifest(false);
if (manifest != null && zos == null) {
OutputStream fos =
FileUtil.makeOutputStream(new File(buildConfig.getOutputDir(),MANIFEST_NAME));
manifest.write(fos);
fos.close();
}
}
private boolean acceptResource(String resourceName) {
if (
(resourceName.startsWith("CVS/")) ||
(resourceName.indexOf("/CVS/") != -1) ||
(resourceName.endsWith("/CVS")) ||
(resourceName.endsWith(".class")) ||
(resourceName.startsWith(".svn/")) ||
(resourceName.indexOf("/.svn/")!=-1) ||
(resourceName.endsWith("/.svn")) ||
(resourceName.toUpperCase().equals(MANIFEST_NAME))
)
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
{
return false;
} else {
return true;
}
}
private void writeOutxmlFile () throws IOException {
if (ignoreOutxml) return;
String filename = buildConfig.getOutxmlName();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(baos);
ps.println("<aspectj>");
ps.println("<aspects>");
if (state.getAspectNames() != null) {
for (Iterator i = state.getAspectNames().iterator(); i.hasNext();) {
String name = (String)i.next();
ps.println("<aspect name=\"" + name + "\"/>");
}
}
ps.println("</aspects>");
ps.println("</aspectj>");
ps.println();
ps.close();
if (zos != null) {
ZipEntry newEntry = new ZipEntry(filename);
zos.putNextEntry(newEntry);
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
zos.write(baos.toByteArray());
zos.closeEntry();
} else {
OutputStream fos =
FileUtil.makeOutputStream(new File(buildConfig.getOutputDir(),filename));
fos.write(baos.toByteArray());
fos.close();
}
}
}
}
/**
* Responsible for managing the ASM model between builds. Contains the policy for
* maintaining the persistance of elements in the model.
*
* This code is driven before each 'fresh' (batch) build to create
* a new model.
*/
private void setupModel(AjBuildConfig config) {
AsmManager.setCreatingModel(config.isEmacsSymMode() || config.isGenerateModelMode());
if (!AsmManager.isCreatingModel()) return;
AsmManager.getDefault().createNewASM();
IHierarchy model = AsmManager.getDefault().getHierarchy();
String rootLabel = "<root>";
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
IProgramElement.Kind kind = IProgramElement.Kind.FILE_JAVA;
if (buildConfig.getConfigFile() != null) {
rootLabel = buildConfig.getConfigFile().getName();
model.setConfigFile(buildConfig.getConfigFile().getAbsolutePath());
kind = IProgramElement.Kind.FILE_LST;
}
model.setRoot(new ProgramElement(rootLabel, kind, new ArrayList()));
model.setFileMap(new HashMap());
setStructureModel(model);
state.setStructureModel(model);
state.setRelationshipMap(AsmManager.getDefault().getRelationshipMap());
}
private void initBcelWorld(IMessageHandler handler) throws IOException {
List cp =
buildConfig.getFullClasspath();
BcelWorld bcelWorld = new BcelWorld(cp, handler, null);
bcelWorld.setBehaveInJava5Way(buildConfig.getBehaveInJava5Way());
bcelWorld.setAddSerialVerUID(buildConfig.isAddSerialVerUID());
bcelWorld.performExtraConfiguration(buildConfig.getXconfigurationInfo());
bcelWorld.setTargetAspectjRuntimeLevel(buildConfig.getTargetAspectjRuntimeLevel());
bcelWorld.setOptionalJoinpoints(buildConfig.getXJoinpoints());
bcelWorld.setXnoInline(buildConfig.isXnoInline());
bcelWorld.setXlazyTjp(buildConfig.isXlazyTjp());
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
bcelWorld.setXHasMemberSupportEnabled(buildConfig.isXHasMemberEnabled());
bcelWorld.setPinpointMode(buildConfig.isXdevPinpoint());
bcelWorld.setErrorAndWarningThreshold(buildConfig.getOptions().errorThreshold,buildConfig.getOptions().warningThreshold);
BcelWeaver bcelWeaver = new BcelWeaver(bcelWorld);
state.setWorld(bcelWorld);
state.setWeaver(bcelWeaver);
state.clearBinarySourceFiles();
if (buildConfig.getLintMode().equals(AjBuildConfig.AJLINT_DEFAULT)) {
bcelWorld.getLint().loadDefaultProperties();
} else {
bcelWorld.getLint().setAll(buildConfig.getLintMode());
}
if (buildConfig.getLintSpecFile() != null) {
bcelWorld.getLint().setFromProperties(buildConfig.getLintSpecFile());
}
for (Iterator i = buildConfig.getAspectpath().iterator(); i.hasNext();) {
File f = (File) i.next();
if (!f.exists()) {
IMessage message = new Message("invalid aspectpath entry: "+f.getName(),null,true);
handler.handleMessage(message);
} else {
bcelWeaver.addLibraryJarFile(f);
}
}
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
for (Iterator i = buildConfig.getInJars().iterator(); i.hasNext(); ) {
File inJar = (File)i.next();
List unwovenClasses = bcelWeaver.addJarFile(inJar, buildConfig.getOutputDir(),false);
state.recordBinarySource(inJar.getPath(), unwovenClasses);
}
for (Iterator i = buildConfig.getInpath().iterator(); i.hasNext(); ) {
File inPathElement = (File)i.next();
if (!inPathElement.isDirectory()) {
List unwovenClasses = bcelWeaver.addJarFile(inPathElement,buildConfig.getOutputDir(),true);
state.recordBinarySource(inPathElement.getPath(),unwovenClasses);
} else {
File[] binSrcs = FileUtil.listFiles(inPathElement, binarySourceFilter);
for (int j = 0; j < binSrcs.length; j++) {
UnwovenClassFile ucf =
bcelWeaver.addClassFile(binSrcs[j], inPathElement, buildConfig.getOutputDir());
List ucfl = new ArrayList();
ucfl.add(ucf);
state.recordBinarySource(binSrcs[j].getPath(),ucfl);
}
}
}
bcelWeaver.setReweavableMode(buildConfig.isXNotReweavable());
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
ResolvedType joinPoint = bcelWorld.resolve("org.aspectj.lang.JoinPoint");
if (joinPoint.isMissing()) {
IMessage message =
new Message("classpath error: unable to find org.aspectj.lang.JoinPoint (check that aspectjrt.jar is in your classpath)",
null,
true);
handler.handleMessage(message);
}
}
public World getWorld() {
return getBcelWorld();
}
void addAspectClassFilesToWeaver(List addedClassFiles) throws IOException {
for (Iterator i = addedClassFiles.iterator(); i.hasNext(); ) {
UnwovenClassFile classFile = (UnwovenClassFile) i.next();
getWeaver().addClassFile(classFile);
}
}
}
}
public FileSystem getLibraryAccess(String[] classpaths, String[] filenames) {
String defaultEncoding = buildConfig.getOptions().defaultEncoding;
if ("".equals(defaultEncoding))
defaultEncoding = null;
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
int[] classpathModes = new int[classpaths.length];
for (int i =0 ;i<classpaths.length;i++) classpathModes[i]=ClasspathDirectory.BINARY;
return new FileSystem(classpaths, filenames, defaultEncoding,classpathModes);
}
public IProblemFactory getProblemFactory() {
return new DefaultProblemFactory(Locale.getDefault());
}
/*
* Build the set of compilation source units
*/
public CompilationUnit[] getCompilationUnits(String[] filenames, String[] encodings) {
int fileCount = filenames.length;
CompilationUnit[] units = new CompilationUnit[fileCount];
String defaultEncoding = buildConfig.getOptions().defaultEncoding;
if ("".equals(defaultEncoding))
defaultEncoding = null;
for (int i = 0; i < fileCount; i++) {
String encoding = encodings[i];
if (encoding == null)
encoding = defaultEncoding;
units[i] = new CompilationUnit(null, filenames[i], encoding);
}
return units;
}
public String extractDestinationPathFromSourceFile(CompilationResult result) {
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
ICompilationUnit compilationUnit = result.compilationUnit;
if (compilationUnit != null) {
char[] fileName = compilationUnit.getFileName();
int lastIndex = CharOperation.lastIndexOf(java.io.File.separatorChar, fileName);
if (lastIndex == -1) {
return System.getProperty("user.dir");
}
return new String(CharOperation.subarray(fileName, 0, lastIndex));
}
return System.getProperty("user.dir");
}
public void performCompilation(List files) {
if (progressListener != null) {
compiledCount=0;
sourceFileCount = files.size();
progressListener.setText("compiling source files");
}
String[] filenames = new String[files.size()];
String[] encodings = new String[files.size()];
for (int i=0; i < files.size(); i++) {
filenames[i] = ((File)files.get(i)).getPath();
}
List cps = buildConfig.getFullClasspath();
Dump.saveFullClasspath(cps);
String[] classpaths = new String[cps.size()];
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
for (int i=0; i < cps.size(); i++) {
classpaths[i] = (String)cps.get(i);
}
environment = getLibraryAccess(classpaths, filenames);
if (!state.getClassNameToFileMap().isEmpty()) {
environment = new StatefulNameEnvironment(environment, state.getClassNameToFileMap());
}
org.aspectj.ajdt.internal.compiler.CompilerAdapter.setCompilerAdapterFactory(this);
org.aspectj.org.eclipse.jdt.internal.compiler.Compiler compiler =
new org.aspectj.org.eclipse.jdt.internal.compiler.Compiler(environment,
DefaultErrorHandlingPolicies.proceedWithAllProblems(),
buildConfig.getOptions().getMap(),
getBatchRequestor(),
getProblemFactory());
CompilerOptions options = compiler.options;
options.produceReferenceInfo = true;
try {
compiler.compile(getCompilationUnits(filenames, encodings));
} catch (OperationCanceledException oce) {
handler.handleMessage(new Message("build cancelled:"+oce.getMessage(),IMessage.WARNING,null,null));
}
org.aspectj.ajdt.internal.compiler.CompilerAdapter.setCompilerAdapterFactory(null);
AnonymousClassPublisher.aspectOf().setAnonymousClassCreationListener(null);
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
environment.cleanup();
environment = null;
}
/*
* Answer the component to which will be handed back compilation results from the compiler
*/
public IIntermediateResultsRequestor getInterimResultRequestor() {
return new IIntermediateResultsRequestor() {
public void acceptResult(InterimCompilationResult result) {
if (progressListener != null) {
compiledCount++;
progressListener.setProgress((compiledCount/2.0)/sourceFileCount);
progressListener.setText("compiled: " + result.fileName());
}
state.noteResult(result);
if (progressListener!=null && progressListener.isCancelledRequested()) {
throw new AbortCompilation(true,
new OperationCanceledException("Compilation cancelled as requested"));
}
}
};
}
public ICompilerRequestor getBatchRequestor() {
return new ICompilerRequestor() {
public void acceptResult(CompilationResult unitResult) {
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
if (!(unitResult.hasErrors() && !proceedOnError())) {
Collection classFiles = unitResult.compiledTypes.values();
boolean shouldAddAspectName = (buildConfig.getOutxmlName() != null);
for (Iterator iter = classFiles.iterator(); iter.hasNext();) {
ClassFile classFile = (ClassFile) iter.next();
String filename = new String(classFile.fileName());
String classname = filename.replace('/', '.');
filename = filename.replace('/', File.separatorChar) + ".class";
try {
if (buildConfig.getOutputJar() == null) {
writeDirectoryEntry(unitResult, classFile,filename);
} else {
writeZipEntry(classFile,filename);
}
if (shouldAddAspectName) addAspectName(classname);
} catch (IOException ex) {
IMessage message = EclipseAdapterUtils.makeErrorMessage(
new String(unitResult.fileName),
CANT_WRITE_RESULT,
ex);
handler.handleMessage(message);
}
}
unitResult.compiledTypes.clear();
}
if (unitResult.hasProblems() || unitResult.hasTasks()) {
IProblem[] problems = unitResult.getAllProblems();
for (int i=0; i < problems.length; i++) {
IMessage message =
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
EclipseAdapterUtils.makeMessage(unitResult.compilationUnit, problems[i],getBcelWorld());
handler.handleMessage(message);
}
}
}
private void writeDirectoryEntry(
CompilationResult unitResult,
ClassFile classFile,
String filename)
throws IOException {
File destinationPath = buildConfig.getOutputDir();
if (buildConfig.getCompilationResultDestinationManager() != null) {
destinationPath =
buildConfig.getCompilationResultDestinationManager().getOutputLocationForClass(new File(new String(unitResult.fileName)));
}
String outFile;
if (destinationPath == null) {
outFile = new File(filename).getName();
outFile = new File(extractDestinationPathFromSourceFile(unitResult), outFile).getPath();
} else {
outFile = new File(destinationPath, filename).getPath();
}
BufferedOutputStream os =
FileUtil.makeOutputStream(new File(outFile));
os.write(classFile.getBytes());
os.close();
}
private void writeZipEntry(ClassFile classFile, String name)
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
throws IOException {
name = name.replace(File.separatorChar,'/');
ZipEntry newEntry = new ZipEntry(name);
zos.putNextEntry(newEntry);
zos.write(classFile.getBytes());
zos.closeEntry();
}
private void addAspectName (String name) {
BcelWorld world = getBcelWorld();
ResolvedType type = world.resolve(name);
if (type.isAspect()) {
if (state.getAspectNames() == null) {
state.initializeAspectNamesList();
}
if (!state.getAspectNames().contains(name)) {
state.getAspectNames().add(name);
}
}
}
};
}
protected boolean proceedOnError() {
return buildConfig.getProceedOnError();
}
}
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
}
private void setBuildConfig(AjBuildConfig buildConfig) {
this.buildConfig = buildConfig;
if (!this.environmentSupportsIncrementalCompilation) {
this.environmentSupportsIncrementalCompilation =
(buildConfig.isIncrementalMode() || buildConfig.isIncrementalFileMode());
}
handler.reset();
}
String makeClasspathString(AjBuildConfig buildConfig) {
if (buildConfig == null || buildConfig.getFullClasspath() == null) return "";
StringBuffer buf = new StringBuffer();
boolean first = true;
for (Iterator it = buildConfig.getFullClasspath().iterator(); it.hasNext(); ) {
if (first) { first = false; }
else { buf.append(File.pathSeparator); }
buf.append(it.next().toString());
}
return buf.toString();
}
/**
* This will return null if aspectjrt.jar is present and has the correct version.
* Otherwise it will return a string message indicating the problem.
*/
private String checkRtJar(AjBuildConfig buildConfig) {
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
if (Version.text.equals(Version.DEVELOPMENT)) {
return null;
}
if (buildConfig == null || buildConfig.getFullClasspath() == null) return "no classpath specified";
String ret = null;
for (Iterator it = buildConfig.getFullClasspath().iterator(); it.hasNext(); ) {
File p = new File( (String)it.next() );
if (p.isFile() && p.getName().startsWith("aspectjrt") && p.getName().endsWith(".jar")) {
try {
String version = null;
Manifest manifest = new JarFile(p).getManifest();
if (manifest == null) {
ret = "no manifest found in " + p.getAbsolutePath() +
", expected " + Version.text;
continue;
}
Attributes attr = manifest.getAttributes("org/aspectj/lang/");
if (null != attr) {
version = attr.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
if (null != version) {
version = version.trim();
}
}
if (Version.DEVELOPMENT.equals(version)) {
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
return null;
} else if (!Version.text.equals(version)) {
ret = "bad version number found in " + p.getAbsolutePath() +
" expected " + Version.text + " found " + version;
continue;
}
} catch (IOException ioe) {
ret = "bad jar file found in " + p.getAbsolutePath() + " error: " + ioe;
}
return null;
} else {
}
}
if (ret != null) return ret;
return "couldn't find aspectjrt.jar on classpath, checked: " + makeClasspathString(buildConfig);
}
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("AjBuildManager(");
buf.append(")");
return buf.toString();
}
public void setStructureModel(IHierarchy structureModel) {
this.structureModel = structureModel;
}
/**
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
* Returns null if there is no structure model
*/
public IHierarchy getStructureModel() {
return structureModel;
}
public IProgressListener getProgressListener() {
return progressListener;
}
public void setProgressListener(IProgressListener progressListener) {
this.progressListener = progressListener;
}
/* (non-Javadoc)
* @see org.aspectj.ajdt.internal.compiler.AjCompiler.IOutputClassFileNameProvider#getOutputClassFileName(char[])
*/
public String getOutputClassFileName(char[] eclipseClassFileName, CompilationResult result) {
String filename = new String(eclipseClassFileName);
filename = filename.replace('/', File.separatorChar) + ".class";
File destinationPath = buildConfig.getOutputDir();
String outFile;
if (destinationPath == null) {
outFile = new File(filename).getName();
outFile = new File(extractDestinationPathFromSourceFile(result), outFile).getPath();
} else {
outFile = new File(destinationPath, filename).getPath();
}
return outFile;
}
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ICompilerAdapterFactory#getAdapter(org.eclipse.jdt.internal.compiler.Compiler)
*/
public ICompilerAdapter getAdapter(org.aspectj.org.eclipse.jdt.internal.compiler.Compiler forCompiler) {
populateCompilerOptionsFromLintSettings(forCompiler);
AjProblemReporter pr =
new AjProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(),
forCompiler.options, getProblemFactory());
forCompiler.problemReporter = pr;
AjLookupEnvironment le =
new AjLookupEnvironment(forCompiler, forCompiler.options, pr, environment);
EclipseFactory factory = new EclipseFactory(le,this);
le.factory = factory;
pr.factory = factory;
forCompiler.lookupEnvironment = le;
forCompiler.parser =
new Parser(
pr,
forCompiler.options.parseLiteralExpressionsAsConstants);
if (getBcelWorld().shouldPipelineCompilation()) {
IMessage message = MessageUtil.info("Pipelining compilation");
handler.handleMessage(message);
return new AjPipeliningCompilerAdapter(forCompiler,batchCompile,getBcelWorld(),getWeaver(),
factory,
getInterimResultRequestor(),
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
progressListener,
this,
this,
state.getBinarySourceMap(),
buildConfig.isTerminateAfterCompilation(),
buildConfig.getProceedOnError(),
buildConfig.isNoAtAspectJAnnotationProcessing(),
state);
} else {
return new AjCompilerAdapter(forCompiler,batchCompile,getBcelWorld(),getWeaver(),
factory,
getInterimResultRequestor(),
progressListener,
this,
this,
state.getBinarySourceMap(),
buildConfig.isTerminateAfterCompilation(),
buildConfig.getProceedOnError(),
buildConfig.isNoAtAspectJAnnotationProcessing(),
state);
}
}
/**
* Some AspectJ lint options need to be known about in the compiler. This is
* how we pass them over...
* @param forCompiler
*/
private void populateCompilerOptionsFromLintSettings(org.aspectj.org.eclipse.jdt.internal.compiler.Compiler forCompiler) {
BcelWorld world = this.state.getBcelWorld();
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
IMessage.Kind swallowedExceptionKind = world.getLint().swallowedExceptionInCatchBlock.getKind();
Map optionsMap = new HashMap();
optionsMap.put(CompilerOptions.OPTION_ReportSwallowedExceptionInCatchBlock,
swallowedExceptionKind == null ? "ignore" : swallowedExceptionKind.toString());
forCompiler.options.set(optionsMap);
}
/* (non-Javadoc)
* @see org.aspectj.ajdt.internal.compiler.IBinarySourceProvider#getBinarySourcesForThisWeave()
*/
public Map getBinarySourcesForThisWeave() {
return binarySourcesForTheNextCompile;
}
public static AsmHierarchyBuilder getAsmHierarchyBuilder() {
return asmHierarchyBuilder;
}
/**
* Override the the default hierarchy builder.
*/
public static void setAsmHierarchyBuilder(AsmHierarchyBuilder newBuilder) {
asmHierarchyBuilder = newBuilder;
}
public AjState getState() {
return state;
}
public void setState(AjState buildState) {
state = buildState;
}
private static class AjBuildContexFormatter implements ContextFormatter {
|
160,167 |
Bug 160167 NPE when using crossrefs option for iajc ant task
|
The ant task is shown below. I ommited the full paths to the values of inpath, outJar, and argfiles, because they are somewhat long (hence the "..." before the file names): <iajc crossrefs="true" argfiles="...\weave-jars.txt" inpath="...\org.eclipse.core.runtime_3.2.0.v20060603.jar" outJar="...\org.eclipse.core.runtime_3.2.0.v20060603_woven.jar"> <classpath> <pathelement location="C:\aspectj1.5\lib\aspectjrt.jar"/> <fileset dir="${plugins.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </iajc> My argfile only contains the absolute path of a single .aj file, which contains one aspect. The aspect is shown below. It is very basic - advice bodies simply toggle a boolean variable. public aspect FFDC { public static boolean bit = false; protected pointcut ffdcScope(): within(org.eclipse..*); protected pointcut excluded(): within(org.eclipse.ffdc.FFDC+) || within(org.eclipse.core.internal.runtime.PlatformActivator); before(CoreException c): ffdcScope() && !excluded() && handler(CoreException+) && args(c) { bit = !bit; } after() throwing(CoreException c): ffdcScope() && !excluded() && !handler(*) { bit = !bit; } after(Plugin activator): execution(void PlatformActivator.start(..)) && this(activator) { bit = !bit; } } This task worked properly before I added "crossrefs=true". After adding this option, I get the following error: weave-C:\eclipse\sdk-aspect-package\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar: [iajc] abort ABORT -- (NullPointerException) null [iajc] null [iajc] java.lang.NullPointerException [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:313) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:367) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:246) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) [iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [iajc] at org.apache.tools.ant.Task.perform(Task.java:364) [iajc] at org.apache.tools.ant.Target.execute(Target.java:341) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
|
resolved fixed
|
f7508cf
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-10-09T12:28:29Z | 2006-10-08T23:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
|
public String formatEntry(int phaseId, Object data) {
StringBuffer sb = new StringBuffer();
if (phaseId == CompilationAndWeavingContext.BATCH_BUILD) {
sb.append("batch building ");
} else {
sb.append("incrementally building ");
}
AjBuildConfig config = (AjBuildConfig) data;
List classpath = config.getClasspath();
sb.append("with classpath: ");
for (Iterator iter = classpath.iterator(); iter.hasNext();) {
sb.append(iter.next().toString());
sb.append(File.pathSeparator);
}
return sb.toString();
}
}
public boolean wasFullBuild() {
return wasFullBuild;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.