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
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
private IMessageHandler messageHandler = IMessageHandler.SYSTEM_ERR; /** * handler for cross-reference information produced during the weaving process */ private ICrossReferenceHandler xrefHandler = null; /** * Currently 'active' scope in which to lookup (resolve) typevariable references */ private TypeVariableDeclaringElement typeVariableLookupScope; protected TypeMap typeMap = new TypeMap(this); private Set<PointcutDesignatorHandler> pointcutDesignators; public static boolean createInjarHierarchy = true; private final AspectPrecedenceCalculator precedenceCalculator; private final CrosscuttingMembersSet crosscuttingMembersSet = new CrosscuttingMembersSet(this); private IStructureModel model = null; private Lint lint = new Lint(this);
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
private boolean XnoInline; private boolean XlazyTjp; private boolean XhasMember = false; /** * Xpinpoint controls whether we put out developer info showing the source of messages */ private boolean Xpinpoint = false; private boolean behaveInJava5Way = false; private boolean timing = false; private boolean timingPeriodically = true; private boolean incrementalCompileCouldFollow = false; private String targetAspectjRuntimeLevel = Constants.RUNTIME_LEVEL_DEFAULT; private boolean optionalJoinpoint_ArrayConstruction = false; private boolean optionalJoinpoint_Synchronization = false; private boolean addSerialVerUID = false; private Properties extraConfiguration = null; private boolean checkedAdvancedConfiguration = false; private boolean synchronizationPointcutsInUse = false;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
private boolean runMinimalMemory = false; private boolean transientTjpFields = false; private boolean runMinimalMemorySet = false; private boolean shouldPipelineCompilation = true; private boolean shouldGenerateStackMaps = false; protected boolean bcelRepositoryCaching = xsetBCEL_REPOSITORY_CACHING_DEFAULT.equalsIgnoreCase("true"); private boolean fastMethodPacking = false; private int itdVersion = 2; private boolean minimalModel = true; private boolean useFinal = true; private boolean targettingRuntime1_6_10 = false; private boolean completeBinaryTypes = false; private boolean overWeaving = false; private static boolean systemPropertyOverWeaving = false; public boolean forDEBUG_structuralChangesCode = false; public boolean forDEBUG_bridgingCode = false; public boolean optimizedMatching = true; protected long timersPerJoinpoint = 25000; protected long timersPerType = 250; public int infoMessagesEnabled = 0; private static Trace trace = TraceFactory.getTraceFactory().getTrace(World.class); private boolean errorThreshold; private boolean warningThreshold; /** * A list of RuntimeExceptions containing full stack information for every type we couldn't find. */ private List<RuntimeException> dumpState_cantFindTypeExceptions = null; static { try {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
String value = System.getProperty("aspectj.overweaving", "false"); if (value.equalsIgnoreCase("true")) { System.out.println("ASPECTJ: aspectj.overweaving=true: overweaving switched ON"); systemPropertyOverWeaving = true; } } catch (Throwable t) { System.err.println("ASPECTJ: Unable to read system properties"); t.printStackTrace(); } } public final Primitive BYTE = new Primitive("B", 1, 0); public final Primitive CHAR = new Primitive("C", 1, 1); public final Primitive DOUBLE = new Primitive("D", 2, 2); public final Primitive FLOAT = new Primitive("F", 1, 3); public final Primitive INT = new Primitive("I", 1, 4); public final Primitive LONG = new Primitive("J", 2, 5); public final Primitive SHORT = new Primitive("S", 1, 6); public final Primitive BOOLEAN = new Primitive("Z", 1, 7); public final Primitive VOID = new Primitive("V", 0, 8); /** * Insert the primitives */ protected World() { super(); typeMap.put("B", BYTE); typeMap.put("S", SHORT); typeMap.put("I", INT); typeMap.put("J", LONG); typeMap.put("F", FLOAT);
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
typeMap.put("D", DOUBLE); typeMap.put("C", CHAR); typeMap.put("Z", BOOLEAN); typeMap.put("V", VOID); precedenceCalculator = new AspectPrecedenceCalculator(this); } /** * Dump processing when a fatal error occurs */ public void accept(Dump.IVisitor visitor) { visitor.visitObject("Shadow mungers:"); visitor.visitList(crosscuttingMembersSet.getShadowMungers()); visitor.visitObject("Type mungers:"); visitor.visitList(crosscuttingMembersSet.getTypeMungers()); visitor.visitObject("Late Type mungers:"); visitor.visitList(crosscuttingMembersSet.getLateTypeMungers()); if (dumpState_cantFindTypeExceptions != null) { visitor.visitObject("Cant find type problems:"); visitor.visitList(dumpState_cantFindTypeExceptions); dumpState_cantFindTypeExceptions = null; } } /** * Resolve a type that we require to be present in the world */
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
public ResolvedType resolve(UnresolvedType ty) { return resolve(ty, false); } /** * Attempt to resolve a type - the source location gives you some context in which resolution is taking place. In the case of an * error where we can't find the type - we can then at least report why (source location) we were trying to resolve it. */ public ResolvedType resolve(UnresolvedType ty, ISourceLocation isl) { ResolvedType ret = resolve(ty, true); if (ResolvedType.isMissing(ty)) { getLint().cantFindType.signal(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE, ty.getName()), isl); } return ret; } /** * Convenience method for resolving an array of unresolved types in one hit. Useful for e.g. resolving type parameters in * signatures. */ public ResolvedType[] resolve(UnresolvedType[] types) { if (types == null) { return ResolvedType.NONE;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} ResolvedType[] ret = new ResolvedType[types.length]; for (int i = 0; i < types.length; i++) { ret[i] = resolve(types[i]); } return ret; } /** * Resolve a type. This the hub of type resolution. The resolved type is added to the type map by signature. */ public ResolvedType resolve(UnresolvedType ty, boolean allowMissing) { if (ty instanceof ResolvedType) { ResolvedType rty = (ResolvedType) ty; rty = resolve(rty); if (!rty.isTypeVariableReference() || ((TypeVariableReferenceType) rty).isTypeVariableResolved()) { return rty; } } if (ty.isTypeVariableReference()) { return ty.resolve(this); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
String signature = ty.getSignature(); ResolvedType ret = typeMap.get(signature); if (ret != null) { ret.world = this; return ret; } else if (signature.equals("?") || signature.equals("*")) { ResolvedType something = getWildcard(); typeMap.put("?", something); return something; } synchronized (buildingTypeLock) { if (ty.isArray()) { ResolvedType componentType = resolve(ty.getComponentType(), allowMissing); ret = new ArrayReferenceType(signature, "[" + componentType.getErasureSignature(), this, componentType); } else { ret = resolveToReferenceType(ty, allowMissing); if (!allowMissing && ret.isMissing()) { ret = handleRequiredMissingTypeDuringResolution(ty); } if (completeBinaryTypes) { completeBinaryType(ret); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} } ResolvedType result = typeMap.get(signature); if (result == null && !ret.isMissing()) { ret = ensureRawTypeIfNecessary(ret); typeMap.put(signature, ret); return ret; } if (result == null) { return ret; } else { return result; } } private Object buildingTypeLock = new Object(); private BoundedReferenceType wildcard; private BoundedReferenceType getWildcard() { if (wildcard == null) { wildcard = new BoundedReferenceType(this); } return wildcard; } /** * Called when a type is resolved - enables its type hierarchy to be finished off before we proceed */ protected void completeBinaryType(ResolvedType ret) { } /**
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
* Return true if the classloader relating to this world is definetly the one that will define the specified class. Return false * otherwise or we don't know for certain. */ public boolean isLocallyDefined(String classname) { return false; } /** * We tried to resolve a type and couldn't find it... */ private ResolvedType handleRequiredMissingTypeDuringResolution(UnresolvedType ty) { if (dumpState_cantFindTypeExceptions == null) { dumpState_cantFindTypeExceptions = new ArrayList<RuntimeException>(); } if (dumpState_cantFindTypeExceptions.size() < 100) { dumpState_cantFindTypeExceptions.add(new RuntimeException("Can't find type " + ty.getName())); } return new MissingResolvedTypeWithKnownSignature(ty.getSignature(), this); } /** * Some TypeFactory operations create resolved types directly, but these won't be in the typeMap - this resolution process puts * them there. Resolved types are also told their world which is needed for the special autoboxing resolved types. */ public ResolvedType resolve(ResolvedType ty) { if (ty.isTypeVariableReference()) { return ty;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} ResolvedType resolved = typeMap.get(ty.getSignature()); if (resolved == null) { resolved = ensureRawTypeIfNecessary(ty); typeMap.put(ty.getSignature(), resolved); resolved = ty; } resolved.world = this; return resolved; } /** * When the world is operating in 1.5 mode, the TypeMap should only contain RAW types and never directly generic types. The RAW * type will contain a reference to the generic type. * * @param type a possibly generic type for which the raw needs creating as it is not currently in the world * @return a type suitable for putting into the world */ private ResolvedType ensureRawTypeIfNecessary(ResolvedType type) { if (!isInJava5Mode() || type.isRawType()) { return type; } if (type instanceof ReferenceType && ((ReferenceType) type).getDelegate() != null && type.isGenericType()) { ReferenceType rawType = new ReferenceType(type.getSignature(), this); rawType.typeKind = UnresolvedType.TypeKind.RAW; ReferenceTypeDelegate delegate = ((ReferenceType) type).getDelegate(); rawType.setDelegate(delegate); rawType.setGenericType((ReferenceType) type); return rawType; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
return type; } /** * Convenience method for finding a type by name and resolving it in one step. */ public ResolvedType resolve(String name) { ResolvedType ret = resolve(UnresolvedType.forName(name)); return ret; } public ReferenceType resolveToReferenceType(String name) { return (ReferenceType) resolve(name); } public ResolvedType resolve(String name, boolean allowMissing) { return resolve(UnresolvedType.forName(name), allowMissing); } /** * Resolve to a ReferenceType - simple, raw, parameterized, or generic. Raw, parameterized, and generic versions of a type share * a delegate. */ private final ResolvedType resolveToReferenceType(UnresolvedType ty, boolean allowMissing) { if (ty.isParameterizedType()) { ResolvedType rt = resolveGenericTypeFor(ty, allowMissing); if (rt.isMissing()) { return rt; } ReferenceType genericType = (ReferenceType) rt;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
ReferenceType parameterizedType = TypeFactory.createParameterizedType(genericType, ty.typeParameters, this); return parameterizedType; } else if (ty.isGenericType()) { ResolvedType rt = resolveGenericTypeFor(ty, false); ReferenceType genericType = (ReferenceType) rt; return genericType; } else if (ty.isGenericWildcard()) { return resolveGenericWildcardFor((WildcardedUnresolvedType) ty); } else { String erasedSignature = ty.getErasureSignature(); ReferenceType simpleOrRawType = new ReferenceType(erasedSignature, this); if (ty.needsModifiableDelegate()) { simpleOrRawType.setNeedsModifiableDelegate(true); } ReferenceTypeDelegate delegate = resolveDelegate(simpleOrRawType); if (delegate == null) { return new MissingResolvedTypeWithKnownSignature(ty.getSignature(), erasedSignature, this); } if (delegate.isGeneric() && behaveInJava5Way) { simpleOrRawType.typeKind = TypeKind.RAW; ReferenceType genericType = makeGenericTypeFrom(delegate, simpleOrRawType);
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
simpleOrRawType.setDelegate(delegate); genericType.setDelegate(delegate); simpleOrRawType.setGenericType(genericType); return simpleOrRawType; } else { simpleOrRawType.setDelegate(delegate); return simpleOrRawType; } } } /** * Attempt to resolve a type that should be a generic type. */ public ResolvedType resolveGenericTypeFor(UnresolvedType anUnresolvedType, boolean allowMissing) { String rawSignature = anUnresolvedType.getRawType().getSignature(); ResolvedType rawType = typeMap.get(rawSignature); if (rawType == null) { rawType = resolve(UnresolvedType.forSignature(rawSignature), allowMissing); typeMap.put(rawSignature, rawType); } if (rawType.isMissing()) { return rawType; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
ResolvedType genericType = rawType.getGenericType(); if (rawType.isSimpleType() && (anUnresolvedType.typeParameters == null || anUnresolvedType.typeParameters.length == 0)) { rawType.world = this; return rawType; } if (genericType != null) { genericType.world = this; ((ReferenceType) genericType).addDependentType((ReferenceType) rawType); return genericType; } else { ReferenceTypeDelegate delegate = resolveDelegate((ReferenceType) rawType); ReferenceType genericRefType = makeGenericTypeFrom(delegate, ((ReferenceType) rawType)); ((ReferenceType) rawType).setGenericType(genericRefType); genericRefType.setDelegate(delegate); ((ReferenceType) rawType).setDelegate(delegate); return genericRefType; } } private ReferenceType makeGenericTypeFrom(ReferenceTypeDelegate delegate, ReferenceType rawType) { String genericSig = delegate.getDeclaredGenericSignature();
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
if (genericSig != null) { return new ReferenceType(UnresolvedType.forGenericTypeSignature(rawType.getSignature(), delegate.getDeclaredGenericSignature()), this); } else { return new ReferenceType(UnresolvedType.forGenericTypeVariables(rawType.getSignature(), delegate.getTypeVariables()), this); } } /** * Go from an unresolved generic wildcard (represented by UnresolvedType) to a resolved version (BoundedReferenceType). */ private ReferenceType resolveGenericWildcardFor(WildcardedUnresolvedType aType) { BoundedReferenceType ret = null; if (aType.isExtends()) { ReferenceType upperBound = (ReferenceType) resolve(aType.getUpperBound()); ret = new BoundedReferenceType(upperBound, true, this); } else if (aType.isSuper()) { ReferenceType lowerBound = (ReferenceType) resolve(aType.getLowerBound()); ret = new BoundedReferenceType(lowerBound, false, this); } else { ret = getWildcard(); } return ret; } /** * Find the ReferenceTypeDelegate behind this reference type so that it can fulfill its contract. */
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
protected abstract ReferenceTypeDelegate resolveDelegate(ReferenceType ty); /** * Special resolution for "core" types like OBJECT. These are resolved just like any other type, but if they are not found it is * more serious and we issue an error message immediately. */ public ResolvedType getCoreType(UnresolvedType tx) { ResolvedType coreTy = resolve(tx, true); if (coreTy.isMissing()) { MessageUtil.error(messageHandler, WeaverMessages.format(WeaverMessages.CANT_FIND_CORE_TYPE, tx.getName())); } return coreTy; } /** * Lookup a type by signature, if not found then build one and put it in the map. */ public ReferenceType lookupOrCreateName(UnresolvedType ty) { String signature = ty.getSignature(); ReferenceType ret = lookupBySignature(signature); if (ret == null) { ret = ReferenceType.fromTypeX(ty, this); typeMap.put(signature, ret); } return ret; } /** * Lookup a reference type in the world by its signature. Returns null if not found. */ public ReferenceType lookupBySignature(String signature) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
return (ReferenceType) typeMap.get(signature); } /** * Member resolution is achieved by resolving the declaring type and then looking up the member in the resolved declaring type. */ public ResolvedMember resolve(Member member) { ResolvedType declaring = member.getDeclaringType().resolve(this); if (declaring.isRawType()) { declaring = declaring.getGenericType(); } ResolvedMember ret; if (member.getKind() == Member.FIELD) { ret = declaring.lookupField(member); } else { ret = declaring.lookupMethod(member); } if (ret != null) { return ret; } return declaring.lookupSyntheticMember(member); } private boolean allLintIgnored = false; public void setAllLintIgnored() { allLintIgnored = true; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
public boolean areAllLintIgnored() { return allLintIgnored; } public abstract IWeavingSupport getWeavingSupport(); /** * Create an advice shadow munger from the given advice attribute */ /** * Create an advice shadow munger for the given advice kind */ public final Advice createAdviceMunger(AdviceKind kind, Pointcut p, Member signature, int extraParameterFlags, IHasSourceLocation loc, ResolvedType declaringAspect) { AjAttribute.AdviceAttribute attribute = new AjAttribute.AdviceAttribute(kind, p, extraParameterFlags, loc.getStart(), loc.getEnd(), loc.getSourceContext()); return getWeavingSupport().createAdviceMunger(attribute, p, signature, declaringAspect); } /** * Same signature as org.aspectj.util.PartialOrder.PartialComparable.compareTo */ public int compareByPrecedence(ResolvedType aspect1, ResolvedType aspect2) { return precedenceCalculator.compareByPrecedence(aspect1, aspect2); } public Integer getPrecedenceIfAny(ResolvedType aspect1, ResolvedType aspect2) { return precedenceCalculator.getPrecedenceIfAny(aspect1, aspect2); } /** * compares by precedence with the additional rule that a super-aspect is sorted before its sub-aspects */
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
public int compareByPrecedenceAndHierarchy(ResolvedType aspect1, ResolvedType aspect2) { return precedenceCalculator.compareByPrecedenceAndHierarchy(aspect1, aspect2); } /** * Nobody should hold onto a copy of this message handler, or setMessageHandler won't work right. */ public IMessageHandler getMessageHandler() { return messageHandler; } public void setMessageHandler(IMessageHandler messageHandler) { if (this.isInPinpointMode()) { this.messageHandler = new PinpointingMessageHandler(messageHandler); } else { this.messageHandler = messageHandler; } } /** * convenenience method for creating and issuing messages via the message handler - if you supply two locations you will get two * messages. */ public void showMessage(Kind kind, String message, ISourceLocation loc1, ISourceLocation loc2) { if (loc1 != null) { messageHandler.handleMessage(new Message(message, kind, null, loc1)); if (loc2 != null) { messageHandler.handleMessage(new Message(message, kind, null, loc2)); } } else { messageHandler.handleMessage(new Message(message, kind, null, loc2));
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} } public void setCrossReferenceHandler(ICrossReferenceHandler xrefHandler) { this.xrefHandler = xrefHandler; } /** * Get the cross-reference handler for the world, may be null. */ public ICrossReferenceHandler getCrossReferenceHandler() { return xrefHandler; } public void setTypeVariableLookupScope(TypeVariableDeclaringElement scope) { typeVariableLookupScope = scope; } public TypeVariableDeclaringElement getTypeVariableLookupScope() { return typeVariableLookupScope; } public List<DeclareParents> getDeclareParents() { return crosscuttingMembersSet.getDeclareParents(); } public List<DeclareAnnotation> getDeclareAnnotationOnTypes() { return crosscuttingMembersSet.getDeclareAnnotationOnTypes(); } public List<DeclareAnnotation> getDeclareAnnotationOnFields() { return crosscuttingMembersSet.getDeclareAnnotationOnFields(); } public List<DeclareAnnotation> getDeclareAnnotationOnMethods() { return crosscuttingMembersSet.getDeclareAnnotationOnMethods(); } public List<DeclareTypeErrorOrWarning> getDeclareTypeEows() {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
return crosscuttingMembersSet.getDeclareTypeEows(); } public List<DeclareSoft> getDeclareSoft() { return crosscuttingMembersSet.getDeclareSofts(); } public CrosscuttingMembersSet getCrosscuttingMembersSet() { return crosscuttingMembersSet; } public IStructureModel getModel() { return model; } public void setModel(IStructureModel model) { this.model = model; } public Lint getLint() { return lint; } public void setLint(Lint lint) { this.lint = lint; } public boolean isXnoInline() { return XnoInline; } public void setXnoInline(boolean xnoInline) { XnoInline = xnoInline; } public boolean isXlazyTjp() { return XlazyTjp; } public void setXlazyTjp(boolean b) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
XlazyTjp = b; } public boolean isHasMemberSupportEnabled() { return XhasMember; } public void setXHasMemberSupportEnabled(boolean b) { XhasMember = b; } public boolean isInPinpointMode() { return Xpinpoint; } public void setPinpointMode(boolean b) { Xpinpoint = b; } public boolean useFinal() { return useFinal; } public boolean isMinimalModel() { ensureAdvancedConfigurationProcessed(); return minimalModel; } public boolean isTargettingRuntime1_6_10() { ensureAdvancedConfigurationProcessed(); return targettingRuntime1_6_10; } public void setBehaveInJava5Way(boolean b) { behaveInJava5Way = b; } /** * Set the timing option (whether to collect timing info), this will also need INFO messages turned on for the message handler
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
* being used. The reportPeriodically flag should be set to false under AJDT so numbers just come out at the end. */ public void setTiming(boolean timersOn, boolean reportPeriodically) { timing = timersOn; timingPeriodically = reportPeriodically; } /** * Set the error and warning threashold which can be taken from CompilerOptions (see bug 129282) * * @param errorThreshold * @param warningThreshold */ public void setErrorAndWarningThreshold(boolean errorThreshold, boolean warningThreshold) { this.errorThreshold = errorThreshold; this.warningThreshold = warningThreshold; } /** * @return true if ignoring the UnusedDeclaredThrownException and false if this compiler option is set to error or warning */ public boolean isIgnoringUnusedDeclaredThrownException() { return errorThreshold||warningThreshold; } public void performExtraConfiguration(String config) { if (config == null) { return; } extraConfiguration = new Properties();
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
int pos = -1; while ((pos = config.indexOf(",")) != -1) { String nvpair = config.substring(0, pos); int pos2 = nvpair.indexOf("="); if (pos2 != -1) { String n = nvpair.substring(0, pos2); String v = nvpair.substring(pos2 + 1); extraConfiguration.setProperty(n, v); } config = config.substring(pos + 1); } if (config.length() > 0) { int pos2 = config.indexOf("="); if (pos2 != -1) { String n = config.substring(0, pos2); String v = config.substring(pos2 + 1); extraConfiguration.setProperty(n, v); } } ensureAdvancedConfigurationProcessed(); } public boolean areInfoMessagesEnabled() { if (infoMessagesEnabled == 0) { infoMessagesEnabled = (messageHandler.isIgnoring(IMessage.INFO) ? 1 : 2); } return infoMessagesEnabled == 2; } /** * may return null */
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
public Properties getExtraConfiguration() { return extraConfiguration; } public final static String xsetAVOID_FINAL = "avoidFinal"; public final static String xsetWEAVE_JAVA_PACKAGES = "weaveJavaPackages"; public final static String xsetWEAVE_JAVAX_PACKAGES = "weaveJavaxPackages"; public final static String xsetCAPTURE_ALL_CONTEXT = "captureAllContext"; public final static String xsetRUN_MINIMAL_MEMORY = "runMinimalMemory"; public final static String xsetDEBUG_STRUCTURAL_CHANGES_CODE = "debugStructuralChangesCode"; public final static String xsetDEBUG_BRIDGING = "debugBridging"; public final static String xsetTRANSIENT_TJP_FIELDS = "makeTjpFieldsTransient"; public final static String xsetBCEL_REPOSITORY_CACHING = "bcelRepositoryCaching"; public final static String xsetPIPELINE_COMPILATION = "pipelineCompilation"; public final static String xsetGENERATE_STACKMAPS = "generateStackMaps"; public final static String xsetPIPELINE_COMPILATION_DEFAULT = "true"; public final static String xsetCOMPLETE_BINARY_TYPES = "completeBinaryTypes"; public final static String xsetCOMPLETE_BINARY_TYPES_DEFAULT = "false"; public final static String xsetTYPE_DEMOTION = "typeDemotion";
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
public final static String xsetTYPE_DEMOTION_DEBUG = "typeDemotionDebug"; public final static String xsetTYPE_REFS = "useWeakTypeRefs"; public final static String xsetBCEL_REPOSITORY_CACHING_DEFAULT = "true"; public final static String xsetFAST_PACK_METHODS = "fastPackMethods"; public final static String xsetOVERWEAVING = "overWeaving"; public final static String xsetOPTIMIZED_MATCHING = "optimizedMatching"; public final static String xsetTIMERS_PER_JOINPOINT = "timersPerJoinpoint"; public final static String xsetTIMERS_PER_FASTMATCH_CALL = "timersPerFastMatchCall"; public final static String xsetITD_VERSION = "itdVersion"; public final static String xsetITD_VERSION_ORIGINAL = "1"; public final static String xsetITD_VERSION_2NDGEN = "2"; public final static String xsetITD_VERSION_DEFAULT = xsetITD_VERSION_2NDGEN; public final static String xsetMINIMAL_MODEL = "minimalModel"; public final static String xsetTARGETING_RUNTIME_1610 = "targetRuntime1_6_10"; public boolean isInJava5Mode() { return behaveInJava5Way; } public boolean isTimingEnabled() { return timing; } public void setTargetAspectjRuntimeLevel(String s) { targetAspectjRuntimeLevel = s; } public void setOptionalJoinpoints(String jps) { if (jps == null) { return; } if (jps.indexOf("arrayconstruction") != -1) { optionalJoinpoint_ArrayConstruction = true; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
if (jps.indexOf("synchronization") != -1) { optionalJoinpoint_Synchronization = true; } } public boolean isJoinpointArrayConstructionEnabled() { return optionalJoinpoint_ArrayConstruction; } public boolean isJoinpointSynchronizationEnabled() { return optionalJoinpoint_Synchronization; } public String getTargetAspectjRuntimeLevel() { return targetAspectjRuntimeLevel; } public boolean isTargettingAspectJRuntime12() { boolean b = false; if (!isInJava5Mode()) { b = true; } else { b = getTargetAspectjRuntimeLevel().equals(org.aspectj.weaver.Constants.RUNTIME_LEVEL_12); } return b; } /* * Map of types in the world, can have 'references' to expendable ones which can be garbage collected to recover memory. An * expendable type is a reference type that is not exposed to the weaver (ie just pulled in for type resolution purposes). */ public static class TypeMap {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
public final static int DONT_USE_REFS = 0; public final static int USE_WEAK_REFS = 1; public final static int USE_SOFT_REFS = 2; public List<String> addedSinceLastDemote; public List<String> writtenClasses; private static boolean debug = false; public static boolean useExpendableMap = true; private boolean demotionSystemActive;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
private boolean debugDemotion = false; public int policy = USE_WEAK_REFS; final Map<String, ResolvedType> tMap = new HashMap<String, ResolvedType>(); final Map<String, Reference<ResolvedType>> expendableMap = Collections .synchronizedMap(new WeakHashMap<String, Reference<ResolvedType>>()); private final World w; private boolean memoryProfiling = false; private int maxExpendableMapSize = -1; private int collectedTypes = 0; private final ReferenceQueue<ResolvedType> rq = new ReferenceQueue<ResolvedType>(); TypeMap(World w) { demotionSystemActive = w.isDemotionActive() && (w.isLoadtimeWeaving() || w.couldIncrementalCompileFollow()); addedSinceLastDemote = new ArrayList<String>(); writtenClasses = new ArrayList<String>(); this.w = w; memoryProfiling = false; } public Map<String, Reference<ResolvedType>> getExpendableMap() { return expendableMap; } public Map<String, ResolvedType> getMainMap() { return tMap;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} public int demote() { return demote(false); } /** * Go through any types added during the previous file weave. If any are suitable for demotion, then put them in the * expendable map where GC can claim them at some point later. Demotion means: the type is not an aspect, the type is not * java.lang.Object, the type is not primitive and the type is not affected by type mungers in any way. Further refinements * of these conditions may allow for more demotions. * * @return number of types demoted */ public int demote(boolean atEndOfCompile) { if (!demotionSystemActive) { return 0; } if (debugDemotion) { System.out.println("Demotion running " + addedSinceLastDemote); } boolean isLtw = w.isLoadtimeWeaving(); int demotionCounter = 0; if (isLtw) { for (String key : addedSinceLastDemote) { ResolvedType type = tMap.get(key); if (type != null && !type.isAspect() && !type.equals(UnresolvedType.OBJECT) && !type.isPrimitiveType()) { List<ConcreteTypeMunger> typeMungers = type.getInterTypeMungers(); if (typeMungers == null || typeMungers.size() == 0) { tMap.remove(key); insertInExpendableMap(key, type);
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
demotionCounter++; } } } addedSinceLastDemote.clear(); } else { List<String> forRemoval = new ArrayList<String>(); for (String key : addedSinceLastDemote) { ResolvedType type = tMap.get(key); if (type == null) { forRemoval.add(key); continue; } if (!writtenClasses.contains(type.getName())) { continue; } if (type != null && !type.isAspect() && !type.equals(UnresolvedType.OBJECT) && !type.isPrimitiveType()) { List<ConcreteTypeMunger> typeMungers = type.getInterTypeMungers(); if (typeMungers == null || typeMungers.size() == 0) { /* * if (type.isNested()) { try { ReferenceType rt = (ReferenceType) w.resolve(type.getOutermostType()); * if (!rt.isMissing()) { ReferenceTypeDelegate delegate = ((ReferenceType) type).getDelegate(); boolean * isWeavable = delegate == null ? false : delegate.isExposedToWeaver(); boolean hasBeenWoven = delegate * == null ? false : delegate.hasBeenWoven(); if (isWeavable && !hasBeenWoven) { skip demotion of * this inner type for now continue; } } } catch (ClassCastException cce) { cce.printStackTrace(); * System.out.println("outer of " + key + " is not a reftype? " + type.getOutermostType()); throw new * IllegalStateException(cce); } } */
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
ReferenceTypeDelegate delegate = ((ReferenceType) type).getDelegate(); boolean isWeavable = delegate == null ? false : delegate.isExposedToWeaver(); boolean hasBeenWoven = delegate == null ? false : delegate.hasBeenWoven(); if (!isWeavable || hasBeenWoven) { if (debugDemotion) { System.out.println("Demoting " + key); } forRemoval.add(key); tMap.remove(key); insertInExpendableMap(key, type); demotionCounter++; } } else { writtenClasses.remove(type.getName()); forRemoval.add(key); } } else { writtenClasses.remove(type.getName()); forRemoval.add(key); } } addedSinceLastDemote.removeAll(forRemoval); } if (debugDemotion) { System.out.println("Demoted " + demotionCounter + " types. Types remaining in fixed set #" + tMap.keySet().size() + ". addedSinceLastDemote size is " + addedSinceLastDemote.size()); System.out.println("writtenClasses.size() = " + writtenClasses.size() + ": " + writtenClasses); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
if (atEndOfCompile) { if (debugDemotion) { System.out.println("Clearing writtenClasses"); } writtenClasses.clear(); } return demotionCounter; } private void insertInExpendableMap(String key, ResolvedType type) { if (useExpendableMap) { if (!expendableMap.containsKey(key)) { if (policy == USE_SOFT_REFS) { expendableMap.put(key, new SoftReference<ResolvedType>(type)); } else { expendableMap.put(key, new WeakReference<ResolvedType>(type)); } } } } /** * Add a new type into the map, the key is the type signature. Some types do *not* go in the map, these are ones involving * *member* type variables. The reason is that when all you have is the signature which gives you a type variable name, you * cannot guarantee you are using the type variable in the same way as someone previously working with a similarly named * type variable. So, these do not go into the map: - TypeVariableReferenceType. - ParameterizedType where a member type * variable is involved. - BoundedReferenceType when one of the bounds is a type variable. * * definition: "member type variables" - a tvar declared on a generic method/ctor as opposed to those you see declared on a * generic type. */ public ResolvedType put(String key, ResolvedType type) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
if (!type.isCacheable()) { return type; } if (type.isParameterizedType() && type.isParameterizedWithTypeVariable()) { if (debug) { System.err .println("Not putting a parameterized type that utilises member declared type variables into the typemap: key=" + key + " type=" + type); } return type; } if (type.isTypeVariableReference()) { if (debug) { System.err.println("Not putting a type variable reference type into the typemap: key=" + key + " type=" + type); } return type; } if (type instanceof BoundedReferenceType) { if (debug) { System.err.println("Not putting a bounded reference type into the typemap: key=" + key + " type=" + type); } return type; } if (type instanceof MissingResolvedTypeWithKnownSignature) { if (debug) { System.err.println("Not putting a missing type into the typemap: key=" + key + " type=" + type); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
return type; } if ((type instanceof ReferenceType) && (((ReferenceType) type).getDelegate() == null) && w.isExpendable(type)) { if (debug) { System.err.println("Not putting expendable ref type with null delegate into typemap: key=" + key + " type=" + type); } return type; } /* * if ((type instanceof ReferenceType) && type.getWorld().isInJava5Mode() && (((ReferenceType) type).getDelegate() != * null) && type.isGenericType()) { throw new BCException("Attempt to add generic type to typemap " + type.toString() + * " (should be raw)"); } */ if (w.isExpendable(type)) { if (useExpendableMap) { if (policy == USE_WEAK_REFS) { if (memoryProfiling) { expendableMap.put(key, new WeakReference<ResolvedType>(type, rq)); } else { expendableMap.put(key, new WeakReference<ResolvedType>(type)); } } else if (policy == USE_SOFT_REFS) { if (memoryProfiling) { expendableMap.put(key, new SoftReference<ResolvedType>(type, rq)); } else { expendableMap.put(key, new SoftReference<ResolvedType>(type)); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} } if (memoryProfiling && expendableMap.size() > maxExpendableMapSize) { maxExpendableMapSize = expendableMap.size(); } return type; } else { if (demotionSystemActive) { addedSinceLastDemote.add(key); } return tMap.put(key, type); } } public void report() { if (!memoryProfiling) { return; } checkq(); w.getMessageHandler().handleMessage( MessageUtil.info("MEMORY: world expendable type map reached maximum size of #" + maxExpendableMapSize + " entries")); w.getMessageHandler().handleMessage( MessageUtil.info("MEMORY: types collected through garbage collection #" + collectedTypes + " entries")); } public void checkq() { if (!memoryProfiling) { return;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} while (rq.poll() != null) { collectedTypes++; } } /** * Lookup a type by its signature, always look in the real map before the expendable map */ public ResolvedType get(String key) { checkq(); ResolvedType ret = tMap.get(key); if (ret == null) { if (policy == USE_WEAK_REFS) { WeakReference<ResolvedType> ref = (WeakReference<ResolvedType>) expendableMap.get(key); if (ref != null) { ret = ref.get(); } } else if (policy == USE_SOFT_REFS) { SoftReference<ResolvedType> ref = (SoftReference<ResolvedType>) expendableMap.get(key); if (ref != null) { ret = ref.get(); } } } return ret; } public ResolvedType remove(String key) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
ResolvedType ret = tMap.remove(key); if (ret == null) { if (policy == USE_WEAK_REFS) { WeakReference<ResolvedType> wref = (WeakReference<ResolvedType>) expendableMap.remove(key); if (wref != null) { ret = wref.get(); } } else if (policy == USE_SOFT_REFS) { SoftReference<ResolvedType> wref = (SoftReference<ResolvedType>) expendableMap.remove(key); if (wref != null) { ret = wref.get(); } } } return ret; } public void classWriteEvent(String classname) { if (demotionSystemActive) { writtenClasses.add(classname); } if (debugDemotion) { System.out.println("Class write event for " + classname); } } public void demote(ResolvedType type) { String key = type.getSignature(); if (debugDemotion) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
addedSinceLastDemote.remove(key); } tMap.remove(key); insertInExpendableMap(key, type); } } /** * This class is used to compute and store precedence relationships between aspects. */ private static class AspectPrecedenceCalculator {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
private final World world; private final Map<PrecedenceCacheKey, Integer> cachedResults; public AspectPrecedenceCalculator(World forSomeWorld) { world = forSomeWorld; cachedResults = new HashMap<PrecedenceCacheKey, Integer>(); } /** * Ask every declare precedence in the world to order the two aspects. If more than one declare precedence gives an * ordering, and the orderings conflict, then that's an error. */ public int compareByPrecedence(ResolvedType firstAspect, ResolvedType secondAspect) { PrecedenceCacheKey key = new PrecedenceCacheKey(firstAspect, secondAspect); if (cachedResults.containsKey(key)) { return (cachedResults.get(key)).intValue(); } else { int order = 0; DeclarePrecedence orderer = null; for (Iterator<Declare> i = world.getCrosscuttingMembersSet().getDeclareDominates().iterator(); i.hasNext();) { DeclarePrecedence d = (DeclarePrecedence) i.next(); int thisOrder = d.compare(firstAspect, secondAspect); if (thisOrder != 0) { if (orderer == null) { orderer = d; } if (order != 0 && order != thisOrder) { ISourceLocation[] isls = new ISourceLocation[2]; isls[0] = orderer.getSourceLocation();
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
isls[1] = d.getSourceLocation(); Message m = new Message("conflicting declare precedence orderings for aspects: " + firstAspect.getName() + " and " + secondAspect.getName(), null, true, isls); world.getMessageHandler().handleMessage(m); } else { order = thisOrder; } } } cachedResults.put(key, new Integer(order)); return order; } } public Integer getPrecedenceIfAny(ResolvedType aspect1, ResolvedType aspect2) { return cachedResults.get(new PrecedenceCacheKey(aspect1, aspect2)); } public int compareByPrecedenceAndHierarchy(ResolvedType firstAspect, ResolvedType secondAspect) { if (firstAspect.equals(secondAspect)) { return 0; } int ret = compareByPrecedence(firstAspect, secondAspect); if (ret != 0) { return ret; } if (firstAspect.isAssignableFrom(secondAspect)) { return -1; } else if (secondAspect.isAssignableFrom(firstAspect)) { return +1; } return 0;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} private static class PrecedenceCacheKey { public ResolvedType aspect1; public ResolvedType aspect2; public PrecedenceCacheKey(ResolvedType a1, ResolvedType a2) { aspect1 = a1; aspect2 = a2; } @Override public boolean equals(Object obj) { if (!(obj instanceof PrecedenceCacheKey)) { return false; } PrecedenceCacheKey other = (PrecedenceCacheKey) obj; return (aspect1 == other.aspect1 && aspect2 == other.aspect2); } @Override public int hashCode() { return aspect1.hashCode() + aspect2.hashCode(); } } } public void validateType(UnresolvedType type) { } public boolean isDemotionActive() { return true; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
private final Map<Class<?>, TypeVariable[]> workInProgress1 = new HashMap<Class<?>, TypeVariable[]>(); public TypeVariable[] getTypeVariablesCurrentlyBeingProcessed(Class<?> baseClass) { return workInProgress1.get(baseClass); } public void recordTypeVariablesCurrentlyBeingProcessed(Class<?> baseClass, TypeVariable[] typeVariables) { workInProgress1.put(baseClass, typeVariables); } public void forgetTypeVariablesCurrentlyBeingProcessed(Class<?> baseClass) { workInProgress1.remove(baseClass); } public void setAddSerialVerUID(boolean b) { addSerialVerUID = b; } public boolean isAddSerialVerUID() { return addSerialVerUID; } public void flush() { typeMap.expendableMap.clear(); } public void ensureAdvancedConfigurationProcessed() { if (!checkedAdvancedConfiguration) { Properties p = getExtraConfiguration(); if (p != null) { String s = p.getProperty(xsetBCEL_REPOSITORY_CACHING, xsetBCEL_REPOSITORY_CACHING_DEFAULT);
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
bcelRepositoryCaching = s.equalsIgnoreCase("true"); if (!bcelRepositoryCaching) { getMessageHandler().handleMessage( MessageUtil .info("[bcelRepositoryCaching=false] AspectJ will not use a bcel cache for class information")); } s = p.getProperty(xsetITD_VERSION, xsetITD_VERSION_DEFAULT); if (s.equals(xsetITD_VERSION_ORIGINAL)) { itdVersion = 1; } s = p.getProperty(xsetAVOID_FINAL, "false"); if (s.equalsIgnoreCase("true")) { useFinal = false; } s = p.getProperty(xsetMINIMAL_MODEL, "true"); if (s.equalsIgnoreCase("false")) { minimalModel = false; } s = p.getProperty(xsetTARGETING_RUNTIME_1610, "false"); if (s.equalsIgnoreCase("true")) { targettingRuntime1_6_10 = true; } s = p.getProperty(xsetFAST_PACK_METHODS, "true"); fastMethodPacking = s.equalsIgnoreCase("true"); s = p.getProperty(xsetPIPELINE_COMPILATION, xsetPIPELINE_COMPILATION_DEFAULT); shouldPipelineCompilation = s.equalsIgnoreCase("true"); s = p.getProperty(xsetGENERATE_STACKMAPS, "false");
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
shouldGenerateStackMaps = s.equalsIgnoreCase("true"); s = p.getProperty(xsetCOMPLETE_BINARY_TYPES, xsetCOMPLETE_BINARY_TYPES_DEFAULT); completeBinaryTypes = s.equalsIgnoreCase("true"); if (completeBinaryTypes) { getMessageHandler().handleMessage( MessageUtil.info("[completeBinaryTypes=true] Completion of binary types activated")); } s = p.getProperty(xsetTYPE_DEMOTION); if (s != null) { boolean b = typeMap.demotionSystemActive; if (b && s.equalsIgnoreCase("false")) { System.out.println("typeDemotion=false: type demotion switched OFF"); typeMap.demotionSystemActive = false; } else if (!b && s.equalsIgnoreCase("true")) { System.out.println("typeDemotion=true: type demotion switched ON"); typeMap.demotionSystemActive = true; } } s = p.getProperty(xsetOVERWEAVING, "false"); if (s.equalsIgnoreCase("true")) { overWeaving = true; } s = p.getProperty(xsetTYPE_DEMOTION_DEBUG, "false"); if (s.equalsIgnoreCase("true")) { typeMap.debugDemotion = true; } s = p.getProperty(xsetTYPE_REFS, "true"); if (s.equalsIgnoreCase("false")) { typeMap.policy = TypeMap.USE_SOFT_REFS; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
runMinimalMemorySet = p.getProperty(xsetRUN_MINIMAL_MEMORY) != null; s = p.getProperty(xsetRUN_MINIMAL_MEMORY, "false"); runMinimalMemory = s.equalsIgnoreCase("true"); s = p.getProperty(xsetDEBUG_STRUCTURAL_CHANGES_CODE, "false"); forDEBUG_structuralChangesCode = s.equalsIgnoreCase("true"); s = p.getProperty(xsetTRANSIENT_TJP_FIELDS,"false"); transientTjpFields = s.equalsIgnoreCase("true"); s = p.getProperty(xsetDEBUG_BRIDGING, "false"); forDEBUG_bridgingCode = s.equalsIgnoreCase("true"); s = p.getProperty(xsetOPTIMIZED_MATCHING, "true"); optimizedMatching = s.equalsIgnoreCase("true"); if (!optimizedMatching) { getMessageHandler().handleMessage(MessageUtil.info("[optimizedMatching=false] optimized matching turned off")); } s = p.getProperty(xsetTIMERS_PER_JOINPOINT, "25000"); try { timersPerJoinpoint = Integer.parseInt(s); } catch (Exception e) { getMessageHandler().handleMessage(MessageUtil.error("unable to process timersPerJoinpoint value of " + s)); timersPerJoinpoint = 25000; } s = p.getProperty(xsetTIMERS_PER_FASTMATCH_CALL, "250"); try { timersPerType = Integer.parseInt(s); } catch (Exception e) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
getMessageHandler().handleMessage(MessageUtil.error("unable to process timersPerType value of " + s)); timersPerType = 250; } } try { if (systemPropertyOverWeaving) { overWeaving = true; } String value = null; value = System.getProperty("aspectj.typeDemotion", "false"); if (value.equalsIgnoreCase("true")) { System.out.println("ASPECTJ: aspectj.typeDemotion=true: type demotion switched ON"); typeMap.demotionSystemActive = true; } value = System.getProperty("aspectj.minimalModel", "false"); if (value.equalsIgnoreCase("true")) { System.out.println("ASPECTJ: aspectj.minimalModel=true: minimal model switched ON"); minimalModel = true; } } catch (Throwable t) { System.err.println("ASPECTJ: Unable to read system properties"); t.printStackTrace(); } checkedAdvancedConfiguration = true; } } public boolean isRunMinimalMemory() { ensureAdvancedConfigurationProcessed(); return runMinimalMemory; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
public boolean isTransientTjpFields() { ensureAdvancedConfigurationProcessed(); return transientTjpFields; } public boolean isRunMinimalMemorySet() { ensureAdvancedConfigurationProcessed(); return runMinimalMemorySet; } public boolean shouldFastPackMethods() { ensureAdvancedConfigurationProcessed(); return fastMethodPacking; } public boolean shouldPipelineCompilation() { ensureAdvancedConfigurationProcessed(); return shouldPipelineCompilation; } public boolean shouldGenerateStackMaps() { ensureAdvancedConfigurationProcessed(); return shouldGenerateStackMaps; } public void setIncrementalCompileCouldFollow(boolean b) { incrementalCompileCouldFollow = b; } public boolean couldIncrementalCompileFollow() { return incrementalCompileCouldFollow; } public void setSynchronizationPointcutsInUse() { if (trace.isTraceEnabled()) { trace.enter("setSynchronizationPointcutsInUse", this);
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} synchronizationPointcutsInUse = true; if (trace.isTraceEnabled()) { trace.exit("setSynchronizationPointcutsInUse"); } } public boolean areSynchronizationPointcutsInUse() { return synchronizationPointcutsInUse; } /** * Register a new pointcut designator handler with the world - this can be used by any pointcut parsers attached to the world. * * @param designatorHandler handler for the new pointcut */ public void registerPointcutHandler(PointcutDesignatorHandler designatorHandler) { if (pointcutDesignators == null) { pointcutDesignators = new HashSet<PointcutDesignatorHandler>(); } pointcutDesignators.add(designatorHandler); } public Set<PointcutDesignatorHandler> getRegisteredPointcutHandlers() { if (pointcutDesignators == null) { return Collections.emptySet(); } return pointcutDesignators; } public void reportMatch(ShadowMunger munger, Shadow shadow) { } public boolean isOverWeaving() { return overWeaving;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} public void reportCheckerMatch(Checker checker, Shadow shadow) { } /** * @return true if this world has the activation and scope of application of the aspects controlled via aop.xml files */ public boolean isXmlConfigured() { return false; } public boolean isAspectIncluded(ResolvedType aspectType) { return true; } /** * Determine if the named aspect requires a particular type around in order to be useful. The type is named in the aop.xml file * against the aspect. * * @return true if there is a type missing that this aspect really needed around */ public boolean hasUnsatisfiedDependency(ResolvedType aspectType) { return false; } public TypePattern getAspectScope(ResolvedType declaringType) { return null; } public Map<String, ResolvedType> getFixed() { return typeMap.tMap; } public Map<String, Reference<ResolvedType>> getExpendable() { return typeMap.expendableMap; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
/** * Ask the type map to demote any types it can - we don't want them anchored forever. */ public void demote() { typeMap.demote(); } /** * Reference types we don't intend to weave may be ejected from the cache if we need the space. */ protected boolean isExpendable(ResolvedType type) { return !type.equals(UnresolvedType.OBJECT) && !type.isExposedToWeaver() && !type.isPrimitiveType() && !type.isPrimitiveArray(); } private Map<ResolvedType, Set<ResolvedType>> exclusionMap = new HashMap<ResolvedType, Set<ResolvedType>>(); public Map<ResolvedType, Set<ResolvedType>> getExclusionMap() { return exclusionMap; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
private TimeCollector timeCollector = null; /** * Record the time spent matching a pointcut - this will accumulate over the lifetime of this world/weaver and be reported every * 25000 join points. */ public void record(Pointcut pointcut, long timetaken) { if (timeCollector == null) { ensureAdvancedConfigurationProcessed(); timeCollector = new TimeCollector(this); } timeCollector.record(pointcut, timetaken); } /** * Record the time spent fastmatching a pointcut - this will accumulate over the lifetime of this world/weaver and be reported * every 250 types. */ public void recordFastMatch(Pointcut pointcut, long timetaken) { if (timeCollector == null) { ensureAdvancedConfigurationProcessed(); timeCollector = new TimeCollector(this); } timeCollector.recordFastMatch(pointcut, timetaken); } public void reportTimers() { if (timeCollector != null && !timingPeriodically) { timeCollector.report(); timeCollector = new TimeCollector(this); } } private static class TimeCollector {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
private World world; long joinpointCount; long typeCount; long perJoinpointCount; long perTypes; Map<String, Long> joinpointsPerPointcut = new HashMap<String, Long>(); Map<String, Long> timePerPointcut = new HashMap<String, Long>(); Map<String, Long> fastMatchTimesPerPointcut = new HashMap<String, Long>(); Map<String, Long> fastMatchTypesPerPointcut = new HashMap<String, Long>(); TimeCollector(World world) { this.perJoinpointCount = world.timersPerJoinpoint; this.perTypes = world.timersPerType; this.world = world; this.joinpointCount = 0; this.typeCount = 0; this.joinpointsPerPointcut = new HashMap<String, Long>(); this.timePerPointcut = new HashMap<String, Long>(); } public void report() { long totalTime = 0L; for (String p : joinpointsPerPointcut.keySet()) { totalTime += timePerPointcut.get(p);
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} world.getMessageHandler().handleMessage( MessageUtil.info("Pointcut matching cost (total=" + (totalTime / 1000000) + "ms for " + joinpointCount + " joinpoint match calls):")); for (String p : joinpointsPerPointcut.keySet()) { StringBuffer sb = new StringBuffer(); sb.append("Time:" + (timePerPointcut.get(p) / 1000000) + "ms (jps:#" + joinpointsPerPointcut.get(p) + ") matching against " + p); world.getMessageHandler().handleMessage(MessageUtil.info(sb.toString())); } world.getMessageHandler().handleMessage(MessageUtil.info("---")); totalTime = 0L; for (String p : fastMatchTimesPerPointcut.keySet()) { totalTime += fastMatchTimesPerPointcut.get(p); } world.getMessageHandler().handleMessage( MessageUtil.info("Pointcut fast matching cost (total=" + (totalTime / 1000000) + "ms for " + typeCount + " fast match calls):")); for (String p : fastMatchTimesPerPointcut.keySet()) { StringBuffer sb = new StringBuffer(); sb.append("Time:" + (fastMatchTimesPerPointcut.get(p) / 1000000) + "ms (types:#" + fastMatchTypesPerPointcut.get(p) + ") fast matching against " + p); world.getMessageHandler().handleMessage(MessageUtil.info(sb.toString())); } world.getMessageHandler().handleMessage(MessageUtil.info("---")); } void record(Pointcut pointcut, long timetakenInNs) { joinpointCount++; String pointcutText = pointcut.toString(); Long jpcounter = joinpointsPerPointcut.get(pointcutText);
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
if (jpcounter == null) { jpcounter = 1L; } else { jpcounter++; } joinpointsPerPointcut.put(pointcutText, jpcounter); Long time = timePerPointcut.get(pointcutText); if (time == null) { time = timetakenInNs; } else { time += timetakenInNs; } timePerPointcut.put(pointcutText, time); if (world.timingPeriodically) { if ((joinpointCount % perJoinpointCount) == 0) { long totalTime = 0L; for (String p : joinpointsPerPointcut.keySet()) { totalTime += timePerPointcut.get(p); } world.getMessageHandler().handleMessage( MessageUtil.info("Pointcut matching cost (total=" + (totalTime / 1000000) + "ms for " + joinpointCount + " joinpoint match calls):")); for (String p : joinpointsPerPointcut.keySet()) { StringBuffer sb = new StringBuffer(); sb.append("Time:" + (timePerPointcut.get(p) / 1000000) + "ms (jps:#" + joinpointsPerPointcut.get(p) + ") matching against " + p); world.getMessageHandler().handleMessage(MessageUtil.info(sb.toString())); } world.getMessageHandler().handleMessage(MessageUtil.info("---")); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} } void recordFastMatch(Pointcut pointcut, long timetakenInNs) { typeCount++; String pointcutText = pointcut.toString(); Long typecounter = fastMatchTypesPerPointcut.get(pointcutText); if (typecounter == null) { typecounter = 1L; } else { typecounter++; } fastMatchTypesPerPointcut.put(pointcutText, typecounter); Long time = fastMatchTimesPerPointcut.get(pointcutText); if (time == null) { time = timetakenInNs; } else { time += timetakenInNs; } fastMatchTimesPerPointcut.put(pointcutText, time); if (world.timingPeriodically) { if ((typeCount % perTypes) == 0) { long totalTime = 0L; for (String p : fastMatchTimesPerPointcut.keySet()) { totalTime += fastMatchTimesPerPointcut.get(p); } world.getMessageHandler().handleMessage( MessageUtil.info("Pointcut fast matching cost (total=" + (totalTime / 1000000) + "ms for " + typeCount + " fast match calls):")); for (String p : fastMatchTimesPerPointcut.keySet()) { StringBuffer sb = new StringBuffer();
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
sb.append("Time:" + (fastMatchTimesPerPointcut.get(p) / 1000000) + "ms (types:#" + fastMatchTypesPerPointcut.get(p) + ") fast matching against " + p); world.getMessageHandler().handleMessage(MessageUtil.info(sb.toString())); } world.getMessageHandler().handleMessage(MessageUtil.info("---")); } } } } public TypeMap getTypeMap() { return typeMap; } public static void reset() { } /** * Returns the version of ITD that this world wants to create. The default is the new style (2) but in some cases where there * might be a clash, the old style can be used. It is set through the option -Xset:itdVersion=1 * * @return the ITD version this world wants to create - 1=oldstyle 2=new, transparent style */ public int getItdVersion() { return itdVersion; } public abstract boolean isLoadtimeWeaving(); public void classWriteEvent(char[][] compoundName) { } }
374,964
Bug 374964 Performance - improve pointcut expensiveness calculation
Build Identifier: 1.6.12 I'm able to reduce the AspectJ LTW startup overhead on the app I'm working on, from 95 seconds down to 47 seconds, just by switching the "expensiveness" of THIS_OR_TARGET and CALL in PointcutEvaluationExpenseComparator. It seems to make sense to me that THIS_OR_TARGET is more expensive since it requires type matching (under profiler ExactTypePattern.matchesInstanceof() is what shows up as very expensive), whereas CALL can evaluate very quickly in most cases since it just fails to match on method name. I'm not sure if this is specific to my particular usage, but cutting 50% of the LTW startup is a very nice improvement. If you think this change doesn't make sense for everyone, I can work on a patch that makes this configurable somehow. Thanks. Reproducible: Always
resolved fixed
f85631f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-24T01:17:09Z
2012-03-21T17:13:20Z
org.aspectj.matcher/src/org/aspectj/weaver/patterns/PointcutEvaluationExpenseComparator.java
/* ******************************************************************* * Copyright (c) 2004 IBM Corporation. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://www.eclipse.org/legal/epl-v10.html * * ******************************************************************/ package org.aspectj.weaver.patterns; import java.util.Comparator; import org.aspectj.weaver.Shadow; public class PointcutEvaluationExpenseComparator implements Comparator<Pointcut> { private static final int MATCHES_NOTHING = -1; private static final int WITHIN = 1; private static final int ATWITHIN = 2; private static final int STATICINIT = 3; private static final int ADVICEEXECUTION = 4; private static final int HANDLER = 5; private static final int GET_OR_SET = 6; private static final int WITHINCODE = 7; private static final int ATWITHINCODE = 8; private static final int EXE_INIT_PREINIT = 9; private static final int THIS_OR_TARGET = 10; private static final int CALL = 11; private static final int ANNOTATION = 12; private static final int AT_THIS_OR_TARGET = 13; private static final int ARGS = 14; private static final int AT_ARGS = 15; private static final int CFLOW = 16;
374,964
Bug 374964 Performance - improve pointcut expensiveness calculation
Build Identifier: 1.6.12 I'm able to reduce the AspectJ LTW startup overhead on the app I'm working on, from 95 seconds down to 47 seconds, just by switching the "expensiveness" of THIS_OR_TARGET and CALL in PointcutEvaluationExpenseComparator. It seems to make sense to me that THIS_OR_TARGET is more expensive since it requires type matching (under profiler ExactTypePattern.matchesInstanceof() is what shows up as very expensive), whereas CALL can evaluate very quickly in most cases since it just fails to match on method name. I'm not sure if this is specific to my particular usage, but cutting 50% of the LTW startup is a very nice improvement. If you think this change doesn't make sense for everyone, I can work on a patch that makes this configurable somehow. Thanks. Reproducible: Always
resolved fixed
f85631f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-24T01:17:09Z
2012-03-21T17:13:20Z
org.aspectj.matcher/src/org/aspectj/weaver/patterns/PointcutEvaluationExpenseComparator.java
private static final int IF = 17; private static final int OTHER = 20; /** * Compare 2 pointcuts based on an estimate of how expensive they may be to evaluate. * * within * * @within staticinitialization [make sure this has a fast match method] adviceexecution handler get, set withincode * @withincode execution, initialization, preinitialization call * @annotation this, target * @this, @target args * @args cflow, cflowbelow if */ public int compare(Pointcut p1, Pointcut p2) { if (p1.equals(p2)) { return 0; } int result = getScore(p1) - getScore(p2); if (result == 0) { int p1code = p1.hashCode(); int p2code = p2.hashCode(); if (p1code == p2code) { return 0; } else if (p1code < p2code) { return -1; } else { return +1;
374,964
Bug 374964 Performance - improve pointcut expensiveness calculation
Build Identifier: 1.6.12 I'm able to reduce the AspectJ LTW startup overhead on the app I'm working on, from 95 seconds down to 47 seconds, just by switching the "expensiveness" of THIS_OR_TARGET and CALL in PointcutEvaluationExpenseComparator. It seems to make sense to me that THIS_OR_TARGET is more expensive since it requires type matching (under profiler ExactTypePattern.matchesInstanceof() is what shows up as very expensive), whereas CALL can evaluate very quickly in most cases since it just fails to match on method name. I'm not sure if this is specific to my particular usage, but cutting 50% of the LTW startup is a very nice improvement. If you think this change doesn't make sense for everyone, I can work on a patch that makes this configurable somehow. Thanks. Reproducible: Always
resolved fixed
f85631f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-24T01:17:09Z
2012-03-21T17:13:20Z
org.aspectj.matcher/src/org/aspectj/weaver/patterns/PointcutEvaluationExpenseComparator.java
} } return result; } private int getScore(Pointcut p) { if (p.couldMatchKinds() == Shadow.NO_SHADOW_KINDS_BITS) { return MATCHES_NOTHING; } if (p instanceof WithinPointcut) { return WITHIN; } if (p instanceof WithinAnnotationPointcut) { return ATWITHIN; } if (p instanceof KindedPointcut) { KindedPointcut kp = (KindedPointcut) p; Shadow.Kind kind = kp.getKind(); if (kind == Shadow.AdviceExecution) { return ADVICEEXECUTION; } else if ((kind == Shadow.ConstructorCall) || (kind == Shadow.MethodCall)) { return CALL; } else if ((kind == Shadow.ConstructorExecution) || (kind == Shadow.MethodExecution) || (kind == Shadow.Initialization) || (kind == Shadow.PreInitialization)) { return EXE_INIT_PREINIT; } else if (kind == Shadow.ExceptionHandler) { return HANDLER; } else if ((kind == Shadow.FieldGet) || (kind == Shadow.FieldSet)) { return GET_OR_SET; } else if (kind == Shadow.StaticInitialization) {
374,964
Bug 374964 Performance - improve pointcut expensiveness calculation
Build Identifier: 1.6.12 I'm able to reduce the AspectJ LTW startup overhead on the app I'm working on, from 95 seconds down to 47 seconds, just by switching the "expensiveness" of THIS_OR_TARGET and CALL in PointcutEvaluationExpenseComparator. It seems to make sense to me that THIS_OR_TARGET is more expensive since it requires type matching (under profiler ExactTypePattern.matchesInstanceof() is what shows up as very expensive), whereas CALL can evaluate very quickly in most cases since it just fails to match on method name. I'm not sure if this is specific to my particular usage, but cutting 50% of the LTW startup is a very nice improvement. If you think this change doesn't make sense for everyone, I can work on a patch that makes this configurable somehow. Thanks. Reproducible: Always
resolved fixed
f85631f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-24T01:17:09Z
2012-03-21T17:13:20Z
org.aspectj.matcher/src/org/aspectj/weaver/patterns/PointcutEvaluationExpenseComparator.java
return STATICINIT; } else { return OTHER; } } if (p instanceof AnnotationPointcut) { return ANNOTATION; } if (p instanceof ArgsPointcut) { return ARGS; } if (p instanceof ArgsAnnotationPointcut) { return AT_ARGS; } if (p instanceof CflowPointcut || p instanceof ConcreteCflowPointcut) { return CFLOW; } if (p instanceof HandlerPointcut) { return HANDLER; } if (p instanceof IfPointcut) { return IF; } if (p instanceof ThisOrTargetPointcut) { return THIS_OR_TARGET; } if (p instanceof ThisOrTargetAnnotationPointcut) { return AT_THIS_OR_TARGET; } if (p instanceof WithincodePointcut) {
374,964
Bug 374964 Performance - improve pointcut expensiveness calculation
Build Identifier: 1.6.12 I'm able to reduce the AspectJ LTW startup overhead on the app I'm working on, from 95 seconds down to 47 seconds, just by switching the "expensiveness" of THIS_OR_TARGET and CALL in PointcutEvaluationExpenseComparator. It seems to make sense to me that THIS_OR_TARGET is more expensive since it requires type matching (under profiler ExactTypePattern.matchesInstanceof() is what shows up as very expensive), whereas CALL can evaluate very quickly in most cases since it just fails to match on method name. I'm not sure if this is specific to my particular usage, but cutting 50% of the LTW startup is a very nice improvement. If you think this change doesn't make sense for everyone, I can work on a patch that makes this configurable somehow. Thanks. Reproducible: Always
resolved fixed
f85631f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-24T01:17:09Z
2012-03-21T17:13:20Z
org.aspectj.matcher/src/org/aspectj/weaver/patterns/PointcutEvaluationExpenseComparator.java
return WITHINCODE; } if (p instanceof WithinCodeAnnotationPointcut) { return ATWITHINCODE; } if (p instanceof NotPointcut) { return getScore(((NotPointcut) p).getNegatedPointcut()); } if (p instanceof AndPointcut) { int leftScore = getScore(((AndPointcut) p).getLeft()); int rightScore = getScore(((AndPointcut) p).getRight()); if (leftScore < rightScore) { return leftScore; } else { return rightScore; } } if (p instanceof OrPointcut) { int leftScore = getScore(((OrPointcut) p).getLeft()); int rightScore = getScore(((OrPointcut) p).getRight()); if (leftScore > rightScore) { return leftScore; } else { return rightScore; } } return OTHER; } }
374,964
Bug 374964 Performance - improve pointcut expensiveness calculation
Build Identifier: 1.6.12 I'm able to reduce the AspectJ LTW startup overhead on the app I'm working on, from 95 seconds down to 47 seconds, just by switching the "expensiveness" of THIS_OR_TARGET and CALL in PointcutEvaluationExpenseComparator. It seems to make sense to me that THIS_OR_TARGET is more expensive since it requires type matching (under profiler ExactTypePattern.matchesInstanceof() is what shows up as very expensive), whereas CALL can evaluate very quickly in most cases since it just fails to match on method name. I'm not sure if this is specific to my particular usage, but cutting 50% of the LTW startup is a very nice improvement. If you think this change doesn't make sense for everyone, I can work on a patch that makes this configurable somehow. Thanks. Reproducible: Always
resolved fixed
f85631f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-24T01:17:09Z
2012-03-21T17:13:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
/******************************************************************************* * Copyright (c) 2008 Contributors * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http:www.eclipse.org/legal/epl-v10.html * * Contributors: * Andy Clement - initial API and implementation *******************************************************************************/ package org.aspectj.systemtest.ajc170; import java.io.File; import junit.framework.Test; import org.aspectj.apache.bcel.classfile.Field; import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.testing.XMLBasedAjcTestCase; import org.aspectj.weaver.TypeFactory; import org.aspectj.weaver.UnresolvedType; /** * @author Andy Clement */ public class Ajc170Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
374,964
Bug 374964 Performance - improve pointcut expensiveness calculation
Build Identifier: 1.6.12 I'm able to reduce the AspectJ LTW startup overhead on the app I'm working on, from 95 seconds down to 47 seconds, just by switching the "expensiveness" of THIS_OR_TARGET and CALL in PointcutEvaluationExpenseComparator. It seems to make sense to me that THIS_OR_TARGET is more expensive since it requires type matching (under profiler ExactTypePattern.matchesInstanceof() is what shows up as very expensive), whereas CALL can evaluate very quickly in most cases since it just fails to match on method name. I'm not sure if this is specific to my particular usage, but cutting 50% of the LTW startup is a very nice improvement. If you think this change doesn't make sense for everyone, I can work on a patch that makes this configurable somehow. Thanks. Reproducible: Always
resolved fixed
f85631f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-24T01:17:09Z
2012-03-21T17:13:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
/* public void testPublicITDFs_pr73507_1() { runTest("public ITDfs - 1"); } public void testPublicITDFs_pr73507_2() { runTest("public ITDfs - 2"); } public void testPublicITDFs_pr73507_3() { runTest("public ITDfs - 3"); } public void testPublicITDFs_pr73507_4() { runTest("public ITDfs - 4"); } */ public void testBCExceptionAnnoDecp_371998() { runTest("BCException anno decp"); }
374,964
Bug 374964 Performance - improve pointcut expensiveness calculation
Build Identifier: 1.6.12 I'm able to reduce the AspectJ LTW startup overhead on the app I'm working on, from 95 seconds down to 47 seconds, just by switching the "expensiveness" of THIS_OR_TARGET and CALL in PointcutEvaluationExpenseComparator. It seems to make sense to me that THIS_OR_TARGET is more expensive since it requires type matching (under profiler ExactTypePattern.matchesInstanceof() is what shows up as very expensive), whereas CALL can evaluate very quickly in most cases since it just fails to match on method name. I'm not sure if this is specific to my particular usage, but cutting 50% of the LTW startup is a very nice improvement. If you think this change doesn't make sense for everyone, I can work on a patch that makes this configurable somehow. Thanks. Reproducible: Always
resolved fixed
f85631f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-24T01:17:09Z
2012-03-21T17:13:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
public void testTransientTjpFields()throws Exception { runTest("transient tjp fields"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "Code"); Field[] fs = jc.getFields(); for (Field f: fs) { if (!f.isTransient()) { fail("Field should be transient: "+f); } } } public void testGenericsWithTwoTypeParamsOneWildcard() { UnresolvedType ut; ut = TypeFactory.createTypeFromSignature("LFoo<**>;"); assertEquals(2,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<***>;"); assertEquals(3,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<TP;*+Ljava/lang/String;>;"); assertEquals(2,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<*+Ljava/lang/String;TP;>;"); assertEquals(2,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<*+Ljava/lang/String;TP;>;"); assertEquals(2,ut.getTypeParameters().length);
374,964
Bug 374964 Performance - improve pointcut expensiveness calculation
Build Identifier: 1.6.12 I'm able to reduce the AspectJ LTW startup overhead on the app I'm working on, from 95 seconds down to 47 seconds, just by switching the "expensiveness" of THIS_OR_TARGET and CALL in PointcutEvaluationExpenseComparator. It seems to make sense to me that THIS_OR_TARGET is more expensive since it requires type matching (under profiler ExactTypePattern.matchesInstanceof() is what shows up as very expensive), whereas CALL can evaluate very quickly in most cases since it just fails to match on method name. I'm not sure if this is specific to my particular usage, but cutting 50% of the LTW startup is a very nice improvement. If you think this change doesn't make sense for everyone, I can work on a patch that makes this configurable somehow. Thanks. Reproducible: Always
resolved fixed
f85631f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-24T01:17:09Z
2012-03-21T17:13:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
ut = TypeFactory.createTypeFromSignature("LFoo<*TT;>;"); assertEquals(2,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<[I>;"); assertEquals(1,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<[I[Z>;"); assertEquals(2,ut.getTypeParameters().length); } public void testPerThis() { runTest("perthis"); } public void testPerTarget() { runTest("pertarget"); } public void testPerCflow() { runTest("percflow"); } public void testPerTypeWithin() { runTest("pertypewithin"); } public void testDiamond1() { runTest("diamond 1"); } public void testDiamond2() { runTest("diamond 2"); } public void testDiamondItd1() { runTest("diamond itd 1");
374,964
Bug 374964 Performance - improve pointcut expensiveness calculation
Build Identifier: 1.6.12 I'm able to reduce the AspectJ LTW startup overhead on the app I'm working on, from 95 seconds down to 47 seconds, just by switching the "expensiveness" of THIS_OR_TARGET and CALL in PointcutEvaluationExpenseComparator. It seems to make sense to me that THIS_OR_TARGET is more expensive since it requires type matching (under profiler ExactTypePattern.matchesInstanceof() is what shows up as very expensive), whereas CALL can evaluate very quickly in most cases since it just fails to match on method name. I'm not sure if this is specific to my particular usage, but cutting 50% of the LTW startup is a very nice improvement. If you think this change doesn't make sense for everyone, I can work on a patch that makes this configurable somehow. Thanks. Reproducible: Always
resolved fixed
f85631f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-24T01:17:09Z
2012-03-21T17:13:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
} public void testLiterals1() { runTest("literals 1"); } public void testLiterals2() { runTest("literals 2"); } public void testLiteralsItd1() { runTest("literals itd 1"); } public void testStringSwitch1() { runTest("string switch 1"); } public void testStringSwitch2() { runTest("string switch 2"); } public void testMultiCatch1() { runTest("multi catch 1"); } public void testMultiCatch2() { runTest("multi catch 2"); } public void testMultiCatchWithHandler1() { runTest("multi catch with handler 1"); } public void testMultiCatchAspect1() { runTest("multi catch aspect 1"); }
374,964
Bug 374964 Performance - improve pointcut expensiveness calculation
Build Identifier: 1.6.12 I'm able to reduce the AspectJ LTW startup overhead on the app I'm working on, from 95 seconds down to 47 seconds, just by switching the "expensiveness" of THIS_OR_TARGET and CALL in PointcutEvaluationExpenseComparator. It seems to make sense to me that THIS_OR_TARGET is more expensive since it requires type matching (under profiler ExactTypePattern.matchesInstanceof() is what shows up as very expensive), whereas CALL can evaluate very quickly in most cases since it just fails to match on method name. I'm not sure if this is specific to my particular usage, but cutting 50% of the LTW startup is a very nice improvement. If you think this change doesn't make sense for everyone, I can work on a patch that makes this configurable somehow. Thanks. Reproducible: Always
resolved fixed
f85631f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-24T01:17:09Z
2012-03-21T17:13:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
public void testSanity1() { runTest("sanity 1"); } public void testMissingImpl_363979() { runTest("missing impl"); } public void testMissingImpl_363979_2() { runTest("missing impl 2"); } public void testStackOverflow_364380() { runTest("stackoverflow"); } public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Ajc170Tests.class); } @Override protected File getSpecFile() { return new File("../tests/src/org/aspectj/systemtest/ajc170/ajc170.xml"); } }
376,139
Bug 376139 AspectJ throws Nullpointer after its IDE plugin update
Build Identifier: Version: Indigo Service Release 2 Build id: 20120216-1857 java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.ast.SwitchStatement.analyseCode(SwitchStatement.java:118) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:104) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:730) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseC ... oBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Compile error: NullPointerException thrown: null Reproducible: Always Steps to Reproduce: 1. After updating the eclipse plugin
resolved fixed
62fca9a
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-05T22:17:56Z
2012-04-05T04:26:40Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
/******************************************************************************* * Copyright (c) 2008-2012 Contributors * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http:www.eclipse.org/legal/epl-v10.html * * Contributors: * Andy Clement - initial API and implementation *******************************************************************************/ package org.aspectj.systemtest.ajc170; import java.io.File; import junit.framework.Test; import org.aspectj.apache.bcel.classfile.Field; import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.testing.XMLBasedAjcTestCase; import org.aspectj.weaver.TypeFactory; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.World; import org.aspectj.weaver.internal.tools.StandardPointcutExpressionImpl; import org.aspectj.weaver.patterns.Pointcut; import org.aspectj.weaver.patterns.PointcutRewriter; import org.aspectj.weaver.reflect.ReflectionWorld; import org.aspectj.weaver.tools.StandardPointcutParser; /** * @author Andy Clement */ public class Ajc170Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
376,139
Bug 376139 AspectJ throws Nullpointer after its IDE plugin update
Build Identifier: Version: Indigo Service Release 2 Build id: 20120216-1857 java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.ast.SwitchStatement.analyseCode(SwitchStatement.java:118) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:104) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:730) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseC ... oBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Compile error: NullPointerException thrown: null Reproducible: Always Steps to Reproduce: 1. After updating the eclipse plugin
resolved fixed
62fca9a
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-05T22:17:56Z
2012-04-05T04:26:40Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
public void testDecAtFieldOrderingLTW1() { runTest("dec at field ordering ltw 1"); } public void testDecAtFieldOrdering1() { runTest("dec at field ordering 1"); } public void testXmlDefsDeclareAnnoMethod() { runTest("xml defined dec at method"); }
376,139
Bug 376139 AspectJ throws Nullpointer after its IDE plugin update
Build Identifier: Version: Indigo Service Release 2 Build id: 20120216-1857 java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.ast.SwitchStatement.analyseCode(SwitchStatement.java:118) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:104) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:730) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseC ... oBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Compile error: NullPointerException thrown: null Reproducible: Always Steps to Reproduce: 1. After updating the eclipse plugin
resolved fixed
62fca9a
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-05T22:17:56Z
2012-04-05T04:26:40Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
public void testXmlDefsDeclareAnnoMethod2() { runTest("xml defined dec at method 2"); } public void testXmlDefsDeclareAnnoField() { runTest("xml defined dec at field"); } public void testXmlDefsDeclareAnnoFieldVariants1() { runTest("xml defined dec anno - variants 1"); } public void testXmlDefsDeclareAnnoFieldVariants2() { runTest("xml defined dec anno - variants 2"); } public void testXmlDefsDeclareAnnoFieldMultipleValues() { runTest("xml defined dec anno - multiple values"); } public void testXmlDefsDeclareAnnoFieldMultipleValuesAndSpaces() { runTest("xml defined dec anno - multiple values and spaces"); } public void testPointcutExpense_374964() { World world = new ReflectionWorld(true, getClass().getClassLoader()); StandardPointcutParser pointcutParser = StandardPointcutParser.getPointcutParserSupportingAllPrimitives(world); StandardPointcutExpressionImpl pointcutExpression = (StandardPointcutExpressionImpl)pointcutParser.parsePointcutExpression("call(* *(..)) && this(Object)"); Pointcut pc = pointcutExpression.getUnderlyingPointcut(); Pointcut newp = new PointcutRewriter().rewrite(pc); assertEquals("(this(java.lang.Object) && call(* *(..)))",newp.toString());
376,139
Bug 376139 AspectJ throws Nullpointer after its IDE plugin update
Build Identifier: Version: Indigo Service Release 2 Build id: 20120216-1857 java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.ast.SwitchStatement.analyseCode(SwitchStatement.java:118) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:104) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:730) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseC ... oBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Compile error: NullPointerException thrown: null Reproducible: Always Steps to Reproduce: 1. After updating the eclipse plugin
resolved fixed
62fca9a
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-05T22:17:56Z
2012-04-05T04:26:40Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
pointcutExpression = (StandardPointcutExpressionImpl)pointcutParser.parsePointcutExpression("call(* String.*(..)) && this(Object)"); pc = pointcutExpression.getUnderlyingPointcut(); newp = new PointcutRewriter().rewrite(pc); assertEquals("(call(* java.lang.String.*(..)) && this(java.lang.Object))",newp.toString()); pointcutExpression = (StandardPointcutExpressionImpl)pointcutParser.parsePointcutExpression("this(Object) && call(* *(..)) && call(* String.*(..))"); pc = pointcutExpression.getUnderlyingPointcut(); newp = new PointcutRewriter().rewrite(pc); assertEquals("((call(* java.lang.String.*(..)) && this(java.lang.Object)) && call(* *(..)))",newp.toString()); } /* public void testPublicITDFs_pr73507_1() { runTest("public ITDfs - 1"); } public void testPublicITDFs_pr73507_2() { runTest("public ITDfs - 2"); } public void testPublicITDFs_pr73507_3() { runTest("public ITDfs - 3"); } public void testPublicITDFs_pr73507_4() { runTest("public ITDfs - 4"); } */ public void testBCExceptionAnnoDecp_371998() { runTest("BCException anno decp"); }
376,139
Bug 376139 AspectJ throws Nullpointer after its IDE plugin update
Build Identifier: Version: Indigo Service Release 2 Build id: 20120216-1857 java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.ast.SwitchStatement.analyseCode(SwitchStatement.java:118) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:104) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:730) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseC ... oBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Compile error: NullPointerException thrown: null Reproducible: Always Steps to Reproduce: 1. After updating the eclipse plugin
resolved fixed
62fca9a
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-05T22:17:56Z
2012-04-05T04:26:40Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
public void testTransientTjpFields()throws Exception { runTest("transient tjp fields"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "Code"); Field[] fs = jc.getFields(); for (Field f: fs) { if (!f.isTransient()) { fail("Field should be transient: "+f); } } } public void testGenericsWithTwoTypeParamsOneWildcard() { UnresolvedType ut; ut = TypeFactory.createTypeFromSignature("LFoo<**>;"); assertEquals(2,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<***>;"); assertEquals(3,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<TP;*+Ljava/lang/String;>;"); assertEquals(2,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<*+Ljava/lang/String;TP;>;"); assertEquals(2,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<*+Ljava/lang/String;TP;>;"); assertEquals(2,ut.getTypeParameters().length);
376,139
Bug 376139 AspectJ throws Nullpointer after its IDE plugin update
Build Identifier: Version: Indigo Service Release 2 Build id: 20120216-1857 java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.ast.SwitchStatement.analyseCode(SwitchStatement.java:118) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:104) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:730) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseC ... oBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Compile error: NullPointerException thrown: null Reproducible: Always Steps to Reproduce: 1. After updating the eclipse plugin
resolved fixed
62fca9a
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-05T22:17:56Z
2012-04-05T04:26:40Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
ut = TypeFactory.createTypeFromSignature("LFoo<*TT;>;"); assertEquals(2,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<[I>;"); assertEquals(1,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<[I[Z>;"); assertEquals(2,ut.getTypeParameters().length); } public void testPerThis() { runTest("perthis"); } public void testPerTarget() { runTest("pertarget"); } public void testPerCflow() { runTest("percflow"); } public void testPerTypeWithin() { runTest("pertypewithin"); } public void testDiamond1() { runTest("diamond 1"); } public void testDiamond2() { runTest("diamond 2"); } public void testDiamondItd1() { runTest("diamond itd 1");
376,139
Bug 376139 AspectJ throws Nullpointer after its IDE plugin update
Build Identifier: Version: Indigo Service Release 2 Build id: 20120216-1857 java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.ast.SwitchStatement.analyseCode(SwitchStatement.java:118) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:104) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:730) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseC ... oBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Compile error: NullPointerException thrown: null Reproducible: Always Steps to Reproduce: 1. After updating the eclipse plugin
resolved fixed
62fca9a
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-05T22:17:56Z
2012-04-05T04:26:40Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
} public void testLiterals1() { runTest("literals 1"); } public void testLiterals2() { runTest("literals 2"); } public void testLiteralsItd1() { runTest("literals itd 1"); } public void testStringSwitch1() { runTest("string switch 1"); } public void testStringSwitch2() { runTest("string switch 2"); } public void testMultiCatch1() { runTest("multi catch 1"); } public void testMultiCatch2() { runTest("multi catch 2"); } public void testMultiCatchWithHandler1() { runTest("multi catch with handler 1"); } public void testMultiCatchAspect1() { runTest("multi catch aspect 1"); }
376,139
Bug 376139 AspectJ throws Nullpointer after its IDE plugin update
Build Identifier: Version: Indigo Service Release 2 Build id: 20120216-1857 java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.ast.SwitchStatement.analyseCode(SwitchStatement.java:118) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:104) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:730) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseC ... oBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Compile error: NullPointerException thrown: null Reproducible: Always Steps to Reproduce: 1. After updating the eclipse plugin
resolved fixed
62fca9a
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-05T22:17:56Z
2012-04-05T04:26:40Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
public void testSanity1() { runTest("sanity 1"); } public void testMissingImpl_363979() { runTest("missing impl"); } public void testMissingImpl_363979_2() { runTest("missing impl 2"); } public void testStackOverflow_364380() { runTest("stackoverflow"); } public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Ajc170Tests.class); } @Override protected File getSpecFile() { return new File("../tests/src/org/aspectj/systemtest/ajc170/ajc170.xml"); } }
376,351
Bug 376351 attribute problems with Java 7 compilation
From the mailing list, this goes wrong: ***R.java*** public class R{ public static void main(String[] args) {System.out.println(new R().getClass().getName());} } ***R1.java*** public class R1 extends R {} ***RAj.aj*** public aspect RAj { private ThreadLocal<Object> inAspect = new ThreadLocal<Object>(); pointcut createR() : execution(R.new()); Object around() : createR() { System.out.println("aspect:" + inAspect.get() + ":" + this); if (inAspect.get() != null) { return proceed(); } else { inAspect.set(this); return new R1(); } } } compile command: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/ajc.bat -source 1.7 -outxml -outjar araj.jar -classpath "aspectjrt.jar;." RAj.aj run: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/aj5.bat -classpath ".;./araj.jar" R errors: Apr 06, 2012 1:37:40 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: register definition failed java.lang.RuntimeException: Problem processing attributes in RAj at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:385)
resolved fixed
be063b8
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-09T21:15:55Z
2012-04-09T19:33:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
/******************************************************************************* * Copyright (c) 2008-2012 Contributors * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http:www.eclipse.org/legal/epl-v10.html * * Contributors: * Andy Clement - initial API and implementation *******************************************************************************/ package org.aspectj.systemtest.ajc170; import java.io.File; import junit.framework.Test; import org.aspectj.apache.bcel.classfile.Field; import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.testing.XMLBasedAjcTestCase; import org.aspectj.weaver.TypeFactory; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.World; import org.aspectj.weaver.internal.tools.StandardPointcutExpressionImpl; import org.aspectj.weaver.patterns.Pointcut; import org.aspectj.weaver.patterns.PointcutRewriter; import org.aspectj.weaver.reflect.ReflectionWorld; import org.aspectj.weaver.tools.StandardPointcutParser; /** * @author Andy Clement */ public class Ajc170Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
376,351
Bug 376351 attribute problems with Java 7 compilation
From the mailing list, this goes wrong: ***R.java*** public class R{ public static void main(String[] args) {System.out.println(new R().getClass().getName());} } ***R1.java*** public class R1 extends R {} ***RAj.aj*** public aspect RAj { private ThreadLocal<Object> inAspect = new ThreadLocal<Object>(); pointcut createR() : execution(R.new()); Object around() : createR() { System.out.println("aspect:" + inAspect.get() + ":" + this); if (inAspect.get() != null) { return proceed(); } else { inAspect.set(this); return new R1(); } } } compile command: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/ajc.bat -source 1.7 -outxml -outjar araj.jar -classpath "aspectjrt.jar;." RAj.aj run: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/aj5.bat -classpath ".;./araj.jar" R errors: Apr 06, 2012 1:37:40 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: register definition failed java.lang.RuntimeException: Problem processing attributes in RAj at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:385)
resolved fixed
be063b8
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-09T21:15:55Z
2012-04-09T19:33:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
public void testSwitchOnEnum() { runTest("switch on enum"); } public void testDecAtFieldOrderingLTW1() { runTest("dec at field ordering ltw 1"); } public void testDecAtFieldOrdering1() { runTest("dec at field ordering 1"); } public void testXmlDefsDeclareAnnoMethod() { runTest("xml defined dec at method"); }
376,351
Bug 376351 attribute problems with Java 7 compilation
From the mailing list, this goes wrong: ***R.java*** public class R{ public static void main(String[] args) {System.out.println(new R().getClass().getName());} } ***R1.java*** public class R1 extends R {} ***RAj.aj*** public aspect RAj { private ThreadLocal<Object> inAspect = new ThreadLocal<Object>(); pointcut createR() : execution(R.new()); Object around() : createR() { System.out.println("aspect:" + inAspect.get() + ":" + this); if (inAspect.get() != null) { return proceed(); } else { inAspect.set(this); return new R1(); } } } compile command: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/ajc.bat -source 1.7 -outxml -outjar araj.jar -classpath "aspectjrt.jar;." RAj.aj run: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/aj5.bat -classpath ".;./araj.jar" R errors: Apr 06, 2012 1:37:40 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: register definition failed java.lang.RuntimeException: Problem processing attributes in RAj at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:385)
resolved fixed
be063b8
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-09T21:15:55Z
2012-04-09T19:33:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
public void testXmlDefsDeclareAnnoMethod2() { runTest("xml defined dec at method 2"); } public void testXmlDefsDeclareAnnoField() { runTest("xml defined dec at field"); } public void testXmlDefsDeclareAnnoFieldVariants1() { runTest("xml defined dec anno - variants 1"); } public void testXmlDefsDeclareAnnoFieldVariants2() { runTest("xml defined dec anno - variants 2"); } public void testXmlDefsDeclareAnnoFieldMultipleValues() { runTest("xml defined dec anno - multiple values"); } public void testXmlDefsDeclareAnnoFieldMultipleValuesAndSpaces() { runTest("xml defined dec anno - multiple values and spaces"); } public void testPointcutExpense_374964() { World world = new ReflectionWorld(true, getClass().getClassLoader()); StandardPointcutParser pointcutParser = StandardPointcutParser.getPointcutParserSupportingAllPrimitives(world); StandardPointcutExpressionImpl pointcutExpression = (StandardPointcutExpressionImpl)pointcutParser.parsePointcutExpression("call(* *(..)) && this(Object)"); Pointcut pc = pointcutExpression.getUnderlyingPointcut(); Pointcut newp = new PointcutRewriter().rewrite(pc); assertEquals("(this(java.lang.Object) && call(* *(..)))",newp.toString());
376,351
Bug 376351 attribute problems with Java 7 compilation
From the mailing list, this goes wrong: ***R.java*** public class R{ public static void main(String[] args) {System.out.println(new R().getClass().getName());} } ***R1.java*** public class R1 extends R {} ***RAj.aj*** public aspect RAj { private ThreadLocal<Object> inAspect = new ThreadLocal<Object>(); pointcut createR() : execution(R.new()); Object around() : createR() { System.out.println("aspect:" + inAspect.get() + ":" + this); if (inAspect.get() != null) { return proceed(); } else { inAspect.set(this); return new R1(); } } } compile command: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/ajc.bat -source 1.7 -outxml -outjar araj.jar -classpath "aspectjrt.jar;." RAj.aj run: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/aj5.bat -classpath ".;./araj.jar" R errors: Apr 06, 2012 1:37:40 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: register definition failed java.lang.RuntimeException: Problem processing attributes in RAj at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:385)
resolved fixed
be063b8
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-09T21:15:55Z
2012-04-09T19:33:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
pointcutExpression = (StandardPointcutExpressionImpl)pointcutParser.parsePointcutExpression("call(* String.*(..)) && this(Object)"); pc = pointcutExpression.getUnderlyingPointcut(); newp = new PointcutRewriter().rewrite(pc); assertEquals("(call(* java.lang.String.*(..)) && this(java.lang.Object))",newp.toString()); pointcutExpression = (StandardPointcutExpressionImpl)pointcutParser.parsePointcutExpression("this(Object) && call(* *(..)) && call(* String.*(..))"); pc = pointcutExpression.getUnderlyingPointcut(); newp = new PointcutRewriter().rewrite(pc); assertEquals("((call(* java.lang.String.*(..)) && this(java.lang.Object)) && call(* *(..)))",newp.toString()); } /* public void testPublicITDFs_pr73507_1() { runTest("public ITDfs - 1"); } public void testPublicITDFs_pr73507_2() { runTest("public ITDfs - 2"); } public void testPublicITDFs_pr73507_3() { runTest("public ITDfs - 3"); } public void testPublicITDFs_pr73507_4() { runTest("public ITDfs - 4"); } */ public void testBCExceptionAnnoDecp_371998() { runTest("BCException anno decp"); }
376,351
Bug 376351 attribute problems with Java 7 compilation
From the mailing list, this goes wrong: ***R.java*** public class R{ public static void main(String[] args) {System.out.println(new R().getClass().getName());} } ***R1.java*** public class R1 extends R {} ***RAj.aj*** public aspect RAj { private ThreadLocal<Object> inAspect = new ThreadLocal<Object>(); pointcut createR() : execution(R.new()); Object around() : createR() { System.out.println("aspect:" + inAspect.get() + ":" + this); if (inAspect.get() != null) { return proceed(); } else { inAspect.set(this); return new R1(); } } } compile command: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/ajc.bat -source 1.7 -outxml -outjar araj.jar -classpath "aspectjrt.jar;." RAj.aj run: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/aj5.bat -classpath ".;./araj.jar" R errors: Apr 06, 2012 1:37:40 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: register definition failed java.lang.RuntimeException: Problem processing attributes in RAj at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:385)
resolved fixed
be063b8
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-09T21:15:55Z
2012-04-09T19:33:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
public void testTransientTjpFields()throws Exception { runTest("transient tjp fields"); JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "Code"); Field[] fs = jc.getFields(); for (Field f: fs) { if (!f.isTransient()) { fail("Field should be transient: "+f); } } } public void testGenericsWithTwoTypeParamsOneWildcard() { UnresolvedType ut; ut = TypeFactory.createTypeFromSignature("LFoo<**>;"); assertEquals(2,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<***>;"); assertEquals(3,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<TP;*+Ljava/lang/String;>;"); assertEquals(2,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<*+Ljava/lang/String;TP;>;"); assertEquals(2,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<*+Ljava/lang/String;TP;>;"); assertEquals(2,ut.getTypeParameters().length);
376,351
Bug 376351 attribute problems with Java 7 compilation
From the mailing list, this goes wrong: ***R.java*** public class R{ public static void main(String[] args) {System.out.println(new R().getClass().getName());} } ***R1.java*** public class R1 extends R {} ***RAj.aj*** public aspect RAj { private ThreadLocal<Object> inAspect = new ThreadLocal<Object>(); pointcut createR() : execution(R.new()); Object around() : createR() { System.out.println("aspect:" + inAspect.get() + ":" + this); if (inAspect.get() != null) { return proceed(); } else { inAspect.set(this); return new R1(); } } } compile command: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/ajc.bat -source 1.7 -outxml -outjar araj.jar -classpath "aspectjrt.jar;." RAj.aj run: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/aj5.bat -classpath ".;./araj.jar" R errors: Apr 06, 2012 1:37:40 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: register definition failed java.lang.RuntimeException: Problem processing attributes in RAj at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:385)
resolved fixed
be063b8
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-09T21:15:55Z
2012-04-09T19:33:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
ut = TypeFactory.createTypeFromSignature("LFoo<*TT;>;"); assertEquals(2,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<[I>;"); assertEquals(1,ut.getTypeParameters().length); ut = TypeFactory.createTypeFromSignature("LFoo<[I[Z>;"); assertEquals(2,ut.getTypeParameters().length); } public void testPerThis() { runTest("perthis"); } public void testPerTarget() { runTest("pertarget"); } public void testPerCflow() { runTest("percflow"); } public void testPerTypeWithin() { runTest("pertypewithin"); } public void testDiamond1() { runTest("diamond 1"); } public void testDiamond2() { runTest("diamond 2"); } public void testDiamondItd1() { runTest("diamond itd 1");
376,351
Bug 376351 attribute problems with Java 7 compilation
From the mailing list, this goes wrong: ***R.java*** public class R{ public static void main(String[] args) {System.out.println(new R().getClass().getName());} } ***R1.java*** public class R1 extends R {} ***RAj.aj*** public aspect RAj { private ThreadLocal<Object> inAspect = new ThreadLocal<Object>(); pointcut createR() : execution(R.new()); Object around() : createR() { System.out.println("aspect:" + inAspect.get() + ":" + this); if (inAspect.get() != null) { return proceed(); } else { inAspect.set(this); return new R1(); } } } compile command: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/ajc.bat -source 1.7 -outxml -outjar araj.jar -classpath "aspectjrt.jar;." RAj.aj run: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/aj5.bat -classpath ".;./araj.jar" R errors: Apr 06, 2012 1:37:40 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: register definition failed java.lang.RuntimeException: Problem processing attributes in RAj at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:385)
resolved fixed
be063b8
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-09T21:15:55Z
2012-04-09T19:33:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
} public void testLiterals1() { runTest("literals 1"); } public void testLiterals2() { runTest("literals 2"); } public void testLiteralsItd1() { runTest("literals itd 1"); } public void testStringSwitch1() { runTest("string switch 1"); } public void testStringSwitch2() { runTest("string switch 2"); } public void testMultiCatch1() { runTest("multi catch 1"); } public void testMultiCatch2() { runTest("multi catch 2"); } public void testMultiCatchWithHandler1() { runTest("multi catch with handler 1"); } public void testMultiCatchAspect1() { runTest("multi catch aspect 1"); }
376,351
Bug 376351 attribute problems with Java 7 compilation
From the mailing list, this goes wrong: ***R.java*** public class R{ public static void main(String[] args) {System.out.println(new R().getClass().getName());} } ***R1.java*** public class R1 extends R {} ***RAj.aj*** public aspect RAj { private ThreadLocal<Object> inAspect = new ThreadLocal<Object>(); pointcut createR() : execution(R.new()); Object around() : createR() { System.out.println("aspect:" + inAspect.get() + ":" + this); if (inAspect.get() != null) { return proceed(); } else { inAspect.set(this); return new R1(); } } } compile command: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/ajc.bat -source 1.7 -outxml -outjar araj.jar -classpath "aspectjrt.jar;." RAj.aj run: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/aj5.bat -classpath ".;./araj.jar" R errors: Apr 06, 2012 1:37:40 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: register definition failed java.lang.RuntimeException: Problem processing attributes in RAj at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:385)
resolved fixed
be063b8
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-09T21:15:55Z
2012-04-09T19:33:20Z
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
public void testSanity1() { runTest("sanity 1"); } public void testMissingImpl_363979() { runTest("missing impl"); } public void testMissingImpl_363979_2() { runTest("missing impl 2"); } public void testStackOverflow_364380() { runTest("stackoverflow"); } public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Ajc170Tests.class); } @Override protected File getSpecFile() { return new File("../tests/src/org/aspectj/systemtest/ajc170/ajc170.xml"); } }
376,351
Bug 376351 attribute problems with Java 7 compilation
From the mailing list, this goes wrong: ***R.java*** public class R{ public static void main(String[] args) {System.out.println(new R().getClass().getName());} } ***R1.java*** public class R1 extends R {} ***RAj.aj*** public aspect RAj { private ThreadLocal<Object> inAspect = new ThreadLocal<Object>(); pointcut createR() : execution(R.new()); Object around() : createR() { System.out.println("aspect:" + inAspect.get() + ":" + this); if (inAspect.get() != null) { return proceed(); } else { inAspect.set(this); return new R1(); } } } compile command: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/ajc.bat -source 1.7 -outxml -outjar araj.jar -classpath "aspectjrt.jar;." RAj.aj run: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/aj5.bat -classpath ".;./araj.jar" R errors: Apr 06, 2012 1:37:40 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: register definition failed java.lang.RuntimeException: Problem processing attributes in RAj at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:385)
resolved fixed
be063b8
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-09T21:15:55Z
2012-04-09T19:33:20Z
weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java
/* ******************************************************************* * Copyright (c) 2008 Contributors * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Andy Clement * ******************************************************************/ package org.aspectj.weaver.bcel.asm; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.World; import aj.org.objectweb.asm.ClassReader; import aj.org.objectweb.asm.ClassWriter; /** * Uses asm to add the stack map attribute to methods in a class. The class is passed in as pure byte data and then a reader/writer * process it. The writer is wired into the world so that types can be resolved and getCommonSuperClass() can be implemented without * class loading using the context class loader. * * @author Andy Clement */ public class StackMapAdder {
376,351
Bug 376351 attribute problems with Java 7 compilation
From the mailing list, this goes wrong: ***R.java*** public class R{ public static void main(String[] args) {System.out.println(new R().getClass().getName());} } ***R1.java*** public class R1 extends R {} ***RAj.aj*** public aspect RAj { private ThreadLocal<Object> inAspect = new ThreadLocal<Object>(); pointcut createR() : execution(R.new()); Object around() : createR() { System.out.println("aspect:" + inAspect.get() + ":" + this); if (inAspect.get() != null) { return proceed(); } else { inAspect.set(this); return new R1(); } } } compile command: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/ajc.bat -source 1.7 -outxml -outjar araj.jar -classpath "aspectjrt.jar;." RAj.aj run: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/aj5.bat -classpath ".;./araj.jar" R errors: Apr 06, 2012 1:37:40 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: register definition failed java.lang.RuntimeException: Problem processing attributes in RAj at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:385)
resolved fixed
be063b8
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-09T21:15:55Z
2012-04-09T19:33:20Z
weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java
public static byte[] addStackMaps(World world, byte[] data) { try { ClassReader cr = new ClassReader(data); ClassWriter cw = new AspectJConnectClassWriter(world); cr.accept(cw, 0); return cw.toByteArray(); } catch (Throwable t) { System.err.println("AspectJ Internal Error: unable to add stackmap attributes. " + t.getMessage()); AsmDetector.isAsmAround = false; return data; } } private static class AspectJConnectClassWriter extends ClassWriter {
376,351
Bug 376351 attribute problems with Java 7 compilation
From the mailing list, this goes wrong: ***R.java*** public class R{ public static void main(String[] args) {System.out.println(new R().getClass().getName());} } ***R1.java*** public class R1 extends R {} ***RAj.aj*** public aspect RAj { private ThreadLocal<Object> inAspect = new ThreadLocal<Object>(); pointcut createR() : execution(R.new()); Object around() : createR() { System.out.println("aspect:" + inAspect.get() + ":" + this); if (inAspect.get() != null) { return proceed(); } else { inAspect.set(this); return new R1(); } } } compile command: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/ajc.bat -source 1.7 -outxml -outjar araj.jar -classpath "aspectjrt.jar;." RAj.aj run: /cygdrive/c/Program\ Files/Java/aspectj-1.6.12/bin/aj5.bat -classpath ".;./araj.jar" R errors: Apr 06, 2012 1:37:40 PM org.aspectj.weaver.tools.Jdk14Trace error SEVERE: register definition failed java.lang.RuntimeException: Problem processing attributes in RAj at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:385)
resolved fixed
be063b8
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-09T21:15:55Z
2012-04-09T19:33:20Z
weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java
private final World world; public AspectJConnectClassWriter(World w) { super(ClassWriter.COMPUTE_FRAMES); this.world = w; } protected String getCommonSuperClass(final String type1, final String type2) { ResolvedType resolvedType1 = world.resolve(UnresolvedType.forName(type1.replace('/', '.'))); ResolvedType resolvedType2 = world.resolve(UnresolvedType.forName(type2.replace('/', '.'))); if (resolvedType1.isAssignableFrom(resolvedType2)) { return type1; } if (resolvedType2.isAssignableFrom(resolvedType1)) { return type2; } if (resolvedType1.isInterface() || resolvedType2.isInterface()) { return "java/lang/Object"; } else { do { resolvedType1 = resolvedType1.getSuperclass(); } while (!resolvedType1.isAssignableFrom(resolvedType2)); return resolvedType1.getName().replace('.', '/'); } } } }
376,990
Bug 376990 iajc does not support source compliance level 1.7
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" When I run this using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136: I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works. I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7. Reproducible: Always Steps to Reproduce: 1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" 2.Run using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
resolved fixed
89c178f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-17T16:39:41Z
2012-04-17T16:26:40Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
/* ******************************************************************* * Copyright (c) 2001-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC) * 2003-2004 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http:www.eclipse.org/legal/epl-v10.html * * Contributors: * Xerox/PARC initial implementation * Wes Isberg 2003-2004 changes * ******************************************************************/ package org.aspectj.tools.ant.taskdefs; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays;
376,990
Bug 376990 iajc does not support source compliance level 1.7
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" When I run this using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136: I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works. I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7. Reproducible: Always Steps to Reproduce: 1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" 2.Run using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
resolved fixed
89c178f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-17T16:39:41Z
2012-04-17T16:26:40Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; import org.apache.tools.ant.AntClassLoader; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Location; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Copy; import org.apache.tools.ant.taskdefs.Delete; import org.apache.tools.ant.taskdefs.Execute; import org.apache.tools.ant.taskdefs.Expand; import org.apache.tools.ant.taskdefs.Javac; import org.apache.tools.ant.taskdefs.LogStreamHandler; import org.apache.tools.ant.taskdefs.MatchingTask; import org.apache.tools.ant.taskdefs.Mkdir; import org.apache.tools.ant.taskdefs.PumpStreamHandler; import org.apache.tools.ant.taskdefs.Zip; import org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter; import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.CommandlineJava; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.PatternSet; import org.apache.tools.ant.types.Reference; import org.apache.tools.ant.types.ZipFileSet; import org.apache.tools.ant.util.TaskLogger; import org.aspectj.bridge.AbortException; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.IMessage.Kind;
376,990
Bug 376990 iajc does not support source compliance level 1.7
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" When I run this using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136: I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works. I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7. Reproducible: Always Steps to Reproduce: 1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" 2.Run using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
resolved fixed
89c178f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-17T16:39:41Z
2012-04-17T16:26:40Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
import org.aspectj.bridge.IMessageHandler; import org.aspectj.bridge.IMessageHolder; import org.aspectj.bridge.MessageHandler; import org.aspectj.bridge.MessageUtil; import org.aspectj.tools.ajc.Main; import org.aspectj.util.FileUtil; import org.aspectj.util.LangUtil; /** * This runs the AspectJ 1.1 compiler, supporting all the command-line options. In 1.1.1, ajc copies resources from input jars, but * you can copy resources from the source directories using sourceRootCopyFilter. When not forking, things will be copied as needed * for each iterative compile, but when forking things are only copied at the completion of a successful compile. * <p> * See the development environment guide for usage documentation. * * @since AspectJ 1.1, Ant 1.5 */ public class AjcTask extends MatchingTask { /* * This task mainly converts ant specification for ajc, verbosely ignoring improper input. It also has some special features for * non-obvious clients: (1) Javac compiler adapter supported in <code>setupAjc(AjcTask, Javac, File)</code> and * <code>readArguments(String[])</code>; (2) testing is supported by (a) permitting the same specification to be re-run with * added flags (settings once made cannot be removed); and (b) permitting recycling the task with <code>reset()</code> * (untested). * * The parts that do more than convert ant specs are (a) code for forking; (b) code for copying resources. * * If you maintain/upgrade this task, keep in mind: (1) changes to the semantics of ajc (new options, new values permitted, * etc.) will have to be reflected here. (2) the clients: the iajc ant script, Javac compiler adapter, maven clients of iajc, * and testing code. */
376,990
Bug 376990 iajc does not support source compliance level 1.7
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" When I run this using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136: I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works. I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7. Reproducible: Always Steps to Reproduce: 1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" 2.Run using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
resolved fixed
89c178f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-17T16:39:41Z
2012-04-17T16:26:40Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
/** * This method extracts javac arguments to ajc, and add arguments to make ajc behave more like javac in copying resources. * <p> * Pass ajc-specific options using compilerarg sub-element: * * <pre> * &lt;javac srcdir=&quot;src&quot;&gt; * &lt;compilerarg compiler=&quot;...&quot; line=&quot;-argfile src/args.lst&quot;/&gt; * &lt;javac&gt; * </pre> * * Some javac arguments are not supported in this component (yet): * * <pre> * String memoryInitialSize; * boolean includeAntRuntime = true; * boolean includeJavaRuntime = false; * </pre> * * Other javac arguments are not supported in ajc 1.1: * * <pre> * boolean optimize; * String forkedExecutable; * FacadeTaskHelper facade; * boolean depend; * String debugLevel; * Path compileSourcepath; * </pre>
376,990
Bug 376990 iajc does not support source compliance level 1.7
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" When I run this using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136: I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works. I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7. Reproducible: Always Steps to Reproduce: 1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" 2.Run using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
resolved fixed
89c178f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-17T16:39:41Z
2012-04-17T16:26:40Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
* * @param javac the Javac command to implement (not null) * @param ajc the AjcTask to adapt (not null) * @param destDir the File class destination directory (may be null) * @return null if no error, or String error otherwise */ public String setupAjc(Javac javac) { if (null == javac) { return "null javac"; } AjcTask ajc = this; ajc.setProject(javac.getProject()); ajc.setLocation(javac.getLocation()); ajc.setTaskName("javac-iajc"); ajc.setDebug(javac.getDebug()); ajc.setDeprecation(javac.getDeprecation()); ajc.setFailonerror(javac.getFailonerror()); final boolean fork = javac.isForkedJavac(); ajc.setFork(fork); if (fork) { ajc.setMaxmem(javac.getMemoryMaximumSize()); } ajc.setNowarn(javac.getNowarn()); ajc.setListFileArgs(javac.getListfiles()); ajc.setVerbose(javac.getVerbose()); ajc.setTarget(javac.getTarget()); ajc.setSource(javac.getSource()); ajc.setEncoding(javac.getEncoding()); File javacDestDir = javac.getDestdir();
376,990
Bug 376990 iajc does not support source compliance level 1.7
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" When I run this using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136: I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works. I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7. Reproducible: Always Steps to Reproduce: 1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" 2.Run using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
resolved fixed
89c178f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-17T16:39:41Z
2012-04-17T16:26:40Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
if (null != javacDestDir) { ajc.setDestdir(javacDestDir); ajc.setSourceRootCopyFilter("**/CVS/*,**/*.java,**/*.aj"); } ajc.setBootclasspath(javac.getBootclasspath()); ajc.setExtdirs(javac.getExtdirs()); ajc.setClasspath(javac.getClasspath()); ajc.addFiles(javac.getFileList()); ajc.readArguments(javac.getCurrentCompilerArgs()); return null; } /** * Find aspectjtools.jar on the task or system classpath. Accept <code>aspectj{-}tools{...}.jar</code> mainly to support build * systems using maven-style re-naming (e.g., <code>aspectj-tools-1.1.0.jar</code>. Note that we search the task classpath * first, though an entry on the system classpath would be loaded first, because it seems more correct as the more specific one. * * @return readable File for aspectjtools.jar, or null if not found. */ public static File findAspectjtoolsJar() { File result = null; ClassLoader loader = AjcTask.class.getClassLoader(); if (loader instanceof AntClassLoader) { AntClassLoader taskLoader = (AntClassLoader) loader; String cp = taskLoader.getClasspath(); String[] cps = LangUtil.splitClasspath(cp);
376,990
Bug 376990 iajc does not support source compliance level 1.7
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" When I run this using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136: I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works. I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7. Reproducible: Always Steps to Reproduce: 1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" 2.Run using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
resolved fixed
89c178f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-17T16:39:41Z
2012-04-17T16:26:40Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
for (int i = 0; (i < cps.length) && (null == result); i++) { result = isAspectjtoolsjar(cps[i]); } } if (null == result) { final Path classpath = Path.systemClasspath; final String[] paths = classpath.list(); for (int i = 0; (i < paths.length) && (null == result); i++) { result = isAspectjtoolsjar(paths[i]); } } return (null == result ? null : result.getAbsoluteFile()); } private static File isAspectjtoolsjar(String path) { if (null == path) { return null; } final String prefix = "aspectj"; final String infix = "tools"; final String altInfix = "-tools"; final String suffix = ".jar"; final int prefixLength = 7; final int minLength = 16; if (!path.endsWith(suffix)) { return null; } int loc = path.lastIndexOf(prefix); if ((-1 != loc) && ((loc + minLength) <= path.length())) {
376,990
Bug 376990 iajc does not support source compliance level 1.7
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" When I run this using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136: I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works. I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7. Reproducible: Always Steps to Reproduce: 1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" 2.Run using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
resolved fixed
89c178f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-17T16:39:41Z
2012-04-17T16:26:40Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
String rest = path.substring(loc + prefixLength); if (-1 != rest.indexOf(File.pathSeparator)) { return null; } if (rest.startsWith(infix) || rest.startsWith(altInfix)) { File result = new File(path); if (result.canRead() && result.isFile()) { return result; } } } return null; } /** * Maximum length (in chars) of command line before converting to an argfile when forking */ private static final int MAX_COMMANDLINE = 4096; private static final File DEFAULT_DESTDIR = new File(".") { public String toString() { return "(no destination dir specified)"; } }; private static final String USAGE_SUBSTRING = "AspectJ-specific options"; private static final List VALID_XOPTIONS; private static final List VALID_WARNINGS; private static final List VALID_DEBUG;
376,990
Bug 376990 iajc does not support source compliance level 1.7
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" When I run this using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136: I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works. I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7. Reproducible: Always Steps to Reproduce: 1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" 2.Run using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
resolved fixed
89c178f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-17T16:39:41Z
2012-04-17T16:26:40Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
/** * -Xlint variants (error, warning, ignore) * * @see org.aspectj.weaver.Lint */ private static final List VALID_XLINT; public static final String COMMAND_EDITOR_NAME = AjcTask.class.getName() + ".COMMAND_EDITOR"; static final String[] TARGET_INPUTS = new String[] { "1.1", "1.2", "1.3", "1.4", "1.5", "1.6" }; static final String[] SOURCE_INPUTS = new String[] { "1.3", "1.4", "1.5", "1.6" }; static final String[] COMPLIANCE_INPUTS = new String[] { "-1.3", "-1.4", "-1.5", "-1.6" }; private static final ICommandEditor COMMAND_EDITOR; static { String[] xs = new String[] { "serializableAspects", "incrementalFile", "lazyTjp", "reweavable", "reweavable:compress", "notReweavable", "noInline", "terminateAfterCompilation", "hasMember", "ajruntimetarget:1.2", "ajruntimetarget:1.5", "addSerialVersionUID" }; VALID_XOPTIONS = Collections.unmodifiableList(Arrays.asList(xs)); xs = new String[] { "constructorName", "packageDefaultMethod", "deprecation", "maskedCatchBlocks", "unusedLocals", "unusedArguments", "unusedImports", "syntheticAccess", "assertIdentifier", "allDeprecation", "allJavadoc", "charConcat", "conditionAssign", "emptyBlock", "fieldHiding", "finally", "indirectStatic", "intfNonInherited", "javadoc", "localHiding", "nls", "noEffectAssign", "pkgDefaultMethod", "semicolon", "unqualifiedField", "unusedPrivate", "unusedThrown", "uselessTypeCheck", "specialParamHiding", "staticReceiver", "syntheticAccess", "none" }; VALID_WARNINGS = Collections.unmodifiableList(Arrays.asList(xs)); xs = new String[] { "none", "lines", "vars", "source" }; VALID_DEBUG = Collections.unmodifiableList(Arrays.asList(xs)); xs = new String[] { "error", "warning", "ignore" }; VALID_XLINT = Collections.unmodifiableList(Arrays.asList(xs));
376,990
Bug 376990 iajc does not support source compliance level 1.7
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" When I run this using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136: I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works. I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7. Reproducible: Always Steps to Reproduce: 1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" 2.Run using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
resolved fixed
89c178f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-17T16:39:41Z
2012-04-17T16:26:40Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
ICommandEditor editor = null; try { String editorClassName = System.getProperty(COMMAND_EDITOR_NAME); if (null != editorClassName) { ClassLoader cl = AjcTask.class.getClassLoader(); Class editorClass = cl.loadClass(editorClassName); editor = (ICommandEditor) editorClass.newInstance(); } } catch (Throwable t) { System.err.println("Warning: unable to load command editor"); t.printStackTrace(System.err); } COMMAND_EDITOR = editor; } private boolean verbose; private boolean timers; private boolean listFileArgs; private boolean failonerror; private boolean fork; private String maxMem; private TaskLogger logger; protected GuardedCommand cmd; private Path srcdir; private Path injars; private Path inpath; private Path classpath; private Path bootclasspath;
376,990
Bug 376990 iajc does not support source compliance level 1.7
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" When I run this using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136: I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works. I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7. Reproducible: Always Steps to Reproduce: 1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" 2.Run using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
resolved fixed
89c178f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-17T16:39:41Z
2012-04-17T16:26:40Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
private Path forkclasspath; private Path extdirs; private Path aspectpath; private Path argfiles; private Path inxmlfiles; private List ignored; private Path sourceRoots; private File xweaveDir; private String xdoneSignal; private List adapterFiles; private String[] adapterArguments; private IMessageHolder messageHolder; private ICommandEditor commandEditor; private boolean copyInjars; private boolean copyInpath; private String sourceRootCopyFilter; private String inpathDirCopyFilter; private File destDir; private File outjar; private boolean outjarFixedup; /** * When possibly copying resources to the output jar, pass ajc a fake output jar to copy from, so we don't change the
376,990
Bug 376990 iajc does not support source compliance level 1.7
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" When I run this using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136: I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works. I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7. Reproducible: Always Steps to Reproduce: 1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows: <iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}" 2.Run using 'ant bean' I get the following line: [iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
resolved fixed
89c178f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-04-17T16:39:41Z
2012-04-17T16:26:40Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
* modification time of the output jar when copying injars/inpath into the actual outjar. */ private File tmpOutjar; private boolean executing; private Main main; private boolean executingInOtherVM; private boolean inIncrementalMode; private boolean inIncrementalFileMode; private boolean logCommand; private CommandlineJava javaCmd = new CommandlineJava(); public AjcTask() { reset(); } public void reset() { adapterArguments = null; adapterFiles = new ArrayList(); argfiles = null; inxmlfiles = null; executing = false; aspectpath = null; bootclasspath = null;