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
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
*/ protected World() { super(); if (trace.isTraceEnabled()) trace.enter("<init>", this); Dump.registerNode(this.getClass(),this); typeMap.put("B", ResolvedType.BYTE); typeMap.put("S", ResolvedType.SHORT); typeMap.put("I", ResolvedType.INT); typeMap.put("J", ResolvedType.LONG); typeMap.put("F", ResolvedType.FLOAT); typeMap.put("D", ResolvedType.DOUBLE); typeMap.put("C", ResolvedType.CHAR); typeMap.put("Z", ResolvedType.BOOLEAN); typeMap.put("V", ResolvedType.VOID); precedenceCalculator = new AspectPrecedenceCalculator(this); if (trace.isTraceEnabled()) trace.exit("<init>"); } /** * Dump processing when a fatal error occurs */ public void accept (Dump.IVisitor visitor) { visitor.visitObject("Shadow mungers:"); visitor.visitList(crosscuttingMembersSet.getShadowMungers()); visitor.visitObject("Type mungers:"); visitor.visitList(crosscuttingMembersSet.getTypeMungers()); visitor.visitObject("Late Type mungers:"); visitor.visitList(crosscuttingMembersSet.getLateTypeMungers()); if (dumpState_cantFindTypeExceptions!=null) { visitor.visitObject("Cant find type problems:");
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
visitor.visitList(dumpState_cantFindTypeExceptions); dumpState_cantFindTypeExceptions = null; } } /** * Resolve a type that we require to be present in the world */ public ResolvedType resolve(UnresolvedType ty) { return resolve(ty, false); } /** * Attempt to resolve a type - the source location gives you some context in which * resolution is taking place. In the case of an error where we can't find the * type - we can then at least report why (source location) we were trying to resolve it. */ public ResolvedType resolve(UnresolvedType ty,ISourceLocation isl) { ResolvedType ret = resolve(ty,true); if (ResolvedType.isMissing(ty)) { getLint().cantFindType.signal(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE,ty.getName()),isl);
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
} return ret; } /** * Convenience method for resolving an array of unresolved types * in one hit. Useful for e.g. resolving type parameters in signatures. */ public ResolvedType[] resolve(UnresolvedType[] types) { if (types == null) return new ResolvedType[0]; ResolvedType[] ret = new ResolvedType[types.length]; for (int i=0; i<types.length; i++) { ret[i] = resolve(types[i]); } return ret; } /** * Resolve a type. This the hub of type resolution. The resolved type is added * to the type map by signature. */ public ResolvedType resolve(UnresolvedType ty, boolean allowMissing) { if (ty instanceof ResolvedType) { ResolvedType rty = (ResolvedType) ty; rty = resolve(rty); return rty; }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
if (ty.isTypeVariableReference()) { return ty.resolve(this); } String signature = ty.getSignature(); ResolvedType ret = typeMap.get(signature); if (ret != null) { ret.world = this; return ret; } else if ( signature.equals("?") || signature.equals("*")) { ResolvedType something = new BoundedReferenceType("?","Ljava/lang/Object",this); typeMap.put("?",something); return something; } if (ty.isArray()) { ResolvedType componentType = resolve(ty.getComponentType(),allowMissing); ret = new ResolvedType.Array(signature, "["+componentType.getErasureSignature(), this, componentType); } else {
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
ret = resolveToReferenceType(ty,allowMissing); if (!allowMissing && ret.isMissing()) { ret = handleRequiredMissingTypeDuringResolution(ty); } if (completeBinaryTypes) { completeBinaryType(ret); } } if (typeMap.get(signature)==null && !ret.isMissing()) { typeMap.put(signature, ret); } return ret; } /** * Called when a type is resolved - enables its type hierarchy to be finished off before we * proceed */ protected void completeBinaryType(ResolvedType ret) {} /** * Return true if the classloader relating to this world is definetly the one that will * define the specified class. Return false otherwise or we don't know for certain. */ public boolean isLocallyDefined(String classname) { return false; }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
/** * We tried to resolve a type and couldn't find it... */ private ResolvedType handleRequiredMissingTypeDuringResolution(UnresolvedType ty) { if (dumpState_cantFindTypeExceptions==null) { dumpState_cantFindTypeExceptions = new ArrayList(); } dumpState_cantFindTypeExceptions.add(new RuntimeException("Can't find type "+ty.getName())); return new MissingResolvedTypeWithKnownSignature(ty.getSignature(),this); } /** * Some TypeFactory operations create resolved types directly, but these won't be * in the typeMap - this resolution process puts them there. Resolved types are * also told their world which is needed for the special autoboxing resolved types. */ public ResolvedType resolve(ResolvedType ty) { if (ty.isTypeVariableReference()) return ty; ResolvedType resolved = typeMap.get(ty.getSignature()); if (resolved == null) { typeMap.put(ty.getSignature(), ty); resolved = ty; } resolved.world = this; return resolved; }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
/** * 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 ResolvedType resolve(String name,boolean allowMissing) { return resolve(UnresolvedType.forName(name),allowMissing); } private ResolvedType currentlyResolvingBaseType; /** * 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; currentlyResolvingBaseType = genericType; ReferenceType parameterizedType = TypeFactory.createParameterizedType(genericType, ty.typeParameters, this); currentlyResolvingBaseType = null; return parameterizedType;
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
} else if (ty.isGenericType()) { ReferenceType genericType = (ReferenceType)resolveGenericTypeFor(ty,false); return genericType; } else if (ty.isGenericWildcard()) { return resolveGenericWildcardFor(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); simpleOrRawType.setDelegate(delegate); genericType.setDelegate(delegate); simpleOrRawType.setGenericType(genericType); return simpleOrRawType; } else { simpleOrRawType.setDelegate(delegate);
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
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 = (ResolvedType) typeMap.get(rawSignature); if (rawType==null) { rawType = resolve(UnresolvedType.forSignature(rawSignature),allowMissing); typeMap.put(rawSignature,rawType); } if (rawType.isMissing()) return rawType; ResolvedType genericType = rawType.getGenericType(); if (rawType.isSimpleType() && (anUnresolvedType.typeParameters==null || anUnresolvedType.typeParameters.length==0)) { rawType.world = this; return rawType;
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
} if (genericType != null) { genericType.world = this; return genericType; } else { ReferenceTypeDelegate delegate = resolveDelegate((ReferenceType)rawType); ReferenceType genericRefType = makeGenericTypeFrom(delegate,((ReferenceType)rawType)); ((ReferenceType)rawType).setGenericType(genericRefType); genericRefType.setDelegate(delegate); ((ReferenceType)rawType).setDelegate(delegate); return genericRefType; } } private ReferenceType makeGenericTypeFrom(ReferenceTypeDelegate delegate, ReferenceType rawType) { String genericSig = delegate.getDeclaredGenericSignature(); if (genericSig != null) { return new ReferenceType( UnresolvedType.forGenericTypeSignature(rawType.getSignature(),delegate.getDeclaredGenericSignature()),this); } else { return new ReferenceType( UnresolvedType.forGenericTypeVariables(rawType.getSignature(), delegate.getTypeVariables()),this); } } /** * Go from an unresolved generic wildcard (represented by UnresolvedType) to a resolved version (BoundedReferenceType). */ private ReferenceType resolveGenericWildcardFor(UnresolvedType aType) {
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
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 { } return ret; } /** * Find the ReferenceTypeDelegate behind this reference type so that it can * fulfill its contract. */ protected abstract ReferenceTypeDelegate resolveDelegate(ReferenceType ty); /** * Special resolution for "core" types like OBJECT. These are resolved just like * any other type, but if they are not found it is more serious and we issue an * error message immediately. */ public ResolvedType getCoreType(UnresolvedType tx) { ResolvedType coreTy = resolve(tx,true); if (coreTy.isMissing()) { MessageUtil.error(messageHandler, WeaverMessages.format(WeaverMessages.CANT_FIND_CORE_TYPE,tx.getName()));
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
} 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) { 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.
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
*/ 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); } /** * Create an advice shadow munger from the given advice attribute */ public abstract Advice createAdviceMunger( AjAttribute.AdviceAttribute attribute, Pointcut pointcut, Member signature); /** * Create an advice shadow munger for the given advice kind */
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
public final Advice createAdviceMunger( AdviceKind kind, Pointcut p, Member signature, int extraParameterFlags, IHasSourceLocation loc) { AjAttribute.AdviceAttribute attribute = new AjAttribute.AdviceAttribute(kind, p, extraParameterFlags, loc.getStart(), loc.getEnd(), loc.getSourceContext()); return createAdviceMunger(attribute, p, signature); } public abstract ConcreteTypeMunger makeCflowStackFieldAdder(ResolvedMember cflowField); public abstract ConcreteTypeMunger makeCflowCounterFieldAdder(ResolvedMember cflowField); /** * Register a munger for perclause @AJ aspect so that we add aspectOf(..) to them as needed * @see org.aspectj.weaver.bcel.BcelWorld#makePerClauseAspect(ResolvedType, org.aspectj.weaver.patterns.PerClause.Kind) */ public abstract ConcreteTypeMunger makePerClauseAspect(ResolvedType aspect, PerClause.Kind kind); public abstract ConcreteTypeMunger concreteTypeMunger(ResolvedTypeMunger munger, ResolvedType aspectType); /** * 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); }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
/** * compares by precedence with the additional rule that a super-aspect is * sorted before its sub-aspects */ public int compareByPrecedenceAndHierarchy(ResolvedType aspect1, ResolvedType aspect2) { return precedenceCalculator.compareByPrecedenceAndHierarchy(aspect1, aspect2); } /** * Nobody should hold onto a copy of this message handler, or setMessageHandler won't * work right. */ public IMessageHandler getMessageHandler() { return messageHandler; } public void setMessageHandler(IMessageHandler messageHandler) { if (this.isInPinpointMode()) { this.messageHandler = new PinpointingMessageHandler(messageHandler); } else { this.messageHandler = messageHandler; } } /** * convenenience method for creating and issuing messages via the message handler - * if you supply two locations you will get two messages. */ public void showMessage(
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
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)); } } public boolean debug (String message) { return MessageUtil.debug(messageHandler,message); } public void setCrossReferenceHandler(ICrossReferenceHandler xrefHandler) { this.xrefHandler = xrefHandler; } /** * Get the cross-reference handler for the world, may be null. */ public ICrossReferenceHandler getCrossReferenceHandler() { return this.xrefHandler; } public void setTypeVariableLookupScope(TypeVariableDeclaringElement scope) { this.typeVariableLookupScope = scope; }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
public TypeVariableDeclaringElement getTypeVariableLookupScope() { return typeVariableLookupScope; } public List getDeclareParents() { return crosscuttingMembersSet.getDeclareParents(); } public List getDeclareAnnotationOnTypes() { return crosscuttingMembersSet.getDeclareAnnotationOnTypes(); } public List getDeclareAnnotationOnFields() { return crosscuttingMembersSet.getDeclareAnnotationOnFields(); } public List getDeclareAnnotationOnMethods() { return crosscuttingMembersSet.getDeclareAnnotationOnMethods(); } public List getDeclareSoft() { return crosscuttingMembersSet.getDeclareSofts(); } public CrosscuttingMembersSet getCrosscuttingMembersSet() { return crosscuttingMembersSet; } public IHierarchy getModel() { return model; } public void setModel(IHierarchy model) { this.model = model; }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
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) { XlazyTjp = b; } public boolean isHasMemberSupportEnabled() { return XhasMember; } public void setXHasMemberSupportEnabled(boolean b) { XhasMember = b; } public boolean isInPinpointMode() { return Xpinpoint; }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
public void setPinpointMode(boolean b) { this.Xpinpoint = b; } public void setBehaveInJava5Way(boolean b) { behaveInJava5Way = b; } /** * Set the error and warning threashold which can be taken from * CompilerOptions (see bug 129282) * * @param errorThreshold * @param warningThreshold */ public void setErrorAndWarningThreshold(long errorThreshold, long warningThreshold) { this.errorThreshold = errorThreshold; this.warningThreshold = warningThreshold; } /** * @return true if ignoring the UnusedDeclaredThrownException and false if * this compiler option is set to error or warning */ public boolean isIgnoringUnusedDeclaredThrownException() { if((this.errorThreshold & 0x800000) != 0 || (this.warningThreshold & 0x800000) != 0)
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
return false; return true; } public void performExtraConfiguration(String config) { if (config==null) return; extraConfiguration = new Properties(); int pos =-1; while ((pos=config.indexOf(","))!=-1) { String nvpair = config.substring(0,pos); int pos2 = nvpair.indexOf("="); if (pos2!=-1) { String n = nvpair.substring(0,pos2); String v = nvpair.substring(pos2+1); extraConfiguration.setProperty(n,v); } config = config.substring(pos+1); } if (config.length()>0) { int pos2 = config.indexOf("="); if (pos2!=-1) { String n = config.substring(0,pos2); String v = config.substring(pos2+1); extraConfiguration.setProperty(n,v); } } ensureAdvancedConfigurationProcessed(); }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
/** * may return null */ public Properties getExtraConfiguration() { return extraConfiguration; } public final static String xsetWEAVE_JAVA_PACKAGES = "weaveJavaPackages"; public final static String xsetWEAVE_JAVAX_PACKAGES = "weaveJavaxPackages"; public final static String xsetCAPTURE_ALL_CONTEXT = "captureAllContext"; public final static String xsetACTIVATE_LIGHTWEIGHT_DELEGATES = "activateLightweightDelegates"; 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 xsetBCEL_REPOSITORY_CACHING = "bcelRepositoryCaching"; public final static String xsetPIPELINE_COMPILATION = "pipelineCompilation"; 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 xsetBCEL_REPOSITORY_CACHING_DEFAULT = "true"; public boolean isInJava5Mode() { return behaveInJava5Way; } public void setTargetAspectjRuntimeLevel(String s) { targetAspectjRuntimeLevel = s; } public void setOptionalJoinpoints(String jps) { if (jps==null) return;
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
if (jps.indexOf("arrayconstruction")!=-1) optionalJoinpoint_ArrayConstruction = true; 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). */ protected static class TypeMap {
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
private static boolean debug = false; public static int DONT_USE_REFS = 0; public static int USE_WEAK_REFS = 1; public static int USE_SOFT_REFS = 2; public static int policy = USE_SOFT_REFS; private Map tMap = new HashMap(); private Map expendableMap = new WeakHashMap(); private World w; private boolean memoryProfiling = false; private int maxExpendableMapSize = -1; private int collectedTypes = 0; private ReferenceQueue rq = new ReferenceQueue(); private static Trace trace = TraceFactory.getTraceFactory().getTrace(World.TypeMap.class); TypeMap(World w) { if (trace.isTraceEnabled()) trace.enter("<init>",this,w); this.w = w; memoryProfiling = false; if (trace.isTraceEnabled()) trace.exit("<init>");
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
} /** * Add a new type into the map, the key is the type signature. * Some types do *not* go in the map, these are ones involving * *member* type variables. The reason is that when all you have is the * signature which gives you a type variable name, you cannot * guarantee you are using the type variable in the same way * as someone previously working with a similarly * named type variable. So, these do not go into the map: * - TypeVariableReferenceType. * - ParameterizedType where a member type variable is involved. * - BoundedReferenceType when one of the bounds is a type variable. * * definition: "member type variables" - a tvar declared on a generic * method/ctor as opposed to those you see declared on a generic type. */ public ResolvedType put(String key, ResolvedType type) { if (type.isParameterizedType() && type.isParameterizedWithAMemberTypeVariable()) { 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; }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
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); return type; } if ((type instanceof ReferenceType) && (((ReferenceType)type).getDelegate()==null) && w.isExpendable(type)) { if (debug) System.err.println("Not putting expendable ref type with null delegate into typemap: key="+key+" type="+type); return type; } if (w.isExpendable(type)) { if (policy==USE_WEAK_REFS) { if (memoryProfiling) expendableMap.put(key,new WeakReference(type,rq)); else expendableMap.put(key,new WeakReference(type)); } else if (policy==USE_SOFT_REFS) { if (memoryProfiling) expendableMap.put(key,new SoftReference(type,rq)); else expendableMap.put(key,new SoftReference(type)); } else { expendableMap.put(key,type); } if (memoryProfiling && expendableMap.size()>maxExpendableMapSize) { maxExpendableMapSize = expendableMap.size();
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
} return type; } else { return (ResolvedType) tMap.put(key,type); } } public void report() { if (!memoryProfiling) return; checkq(); w.getMessageHandler().handleMessage(MessageUtil.info("MEMORY: world expendable type map reached maximum size of #"+maxExpendableMapSize+" entries")); w.getMessageHandler().handleMessage(MessageUtil.info("MEMORY: types collected through garbage collection #"+collectedTypes+" entries")); } public void checkq() { if (!memoryProfiling) return; while (rq.poll()!=null) collectedTypes++; } /** * Lookup a type by its signature, always look * in the real map before the expendable map */ public ResolvedType get(String key) { checkq(); ResolvedType ret = (ResolvedType) tMap.get(key); if (ret == null) { if (policy==USE_WEAK_REFS) { WeakReference ref = (WeakReference)expendableMap.get(key); if (ref != null) {
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
ret = (ResolvedType) ref.get(); } } else if (policy==USE_SOFT_REFS) { SoftReference ref = (SoftReference)expendableMap.get(key); if (ref != null) { ret = (ResolvedType) ref.get(); } } else { return (ResolvedType)expendableMap.get(key); } } return ret; } public ResolvedType remove(String key) { ResolvedType ret = (ResolvedType) tMap.remove(key); if (ret == null) { if (policy==USE_WEAK_REFS) { WeakReference wref = (WeakReference)expendableMap.remove(key); if (wref!=null) ret = (ResolvedType)wref.get(); } else if (policy==USE_SOFT_REFS) { SoftReference wref = (SoftReference)expendableMap.remove(key); if (wref!=null) ret = (ResolvedType)wref.get(); } else { ret = (ResolvedType)expendableMap.remove(key); } } return ret; }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("types:\n"); sb.append(dumpthem(tMap)); sb.append("expendables:\n"); sb.append(dumpthem(expendableMap)); return sb.toString(); } private String dumpthem(Map m) { StringBuffer sb = new StringBuffer(); int otherTypes = 0; int bcelDel = 0; int refDel = 0; for (Iterator iter = m.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); Object val = entry.getValue(); if (val instanceof WeakReference) { val = ((WeakReference)val).get(); } else if (val instanceof SoftReference) { val = ((SoftReference)val).get(); } sb.append(entry.getKey()+"="+val).append("\n"); if (val instanceof ReferenceType) { ReferenceType refType = (ReferenceType)val; if (refType.getDelegate() instanceof BcelObjectType) {
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
bcelDel++; } else if (refType.getDelegate() instanceof ReflectionBasedReferenceTypeDelegate) { refDel++; } else { otherTypes++; } } else { otherTypes++; } } sb.append("# BCEL = "+bcelDel+", # REF = "+refDel+", # Other = "+otherTypes); return sb.toString(); } public int totalSize() { return tMap.size()+expendableMap.size(); } public int hardSize() { return tMap.size(); } public ResolvedType[] getAllTypes() { List results = new ArrayList(); collectTypes(expendableMap, results); collectTypes(tMap, results); return (ResolvedType[]) results.toArray(new ResolvedType[results.size()]); } private void collectTypes(Map map, List results) { for (Iterator iterator = map.keySet().iterator(); iterator.hasNext();) {
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
String key = (String) iterator.next(); ResolvedType type = get((String)key); if (type!=null) results.add(type); else System.err.println("null!:"+key); } } } /** 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 != null) && (!type.isExposedToWeaver()) && (!type.isPrimitiveType()) ); } /** * This class is used to compute and store precedence relationships between * aspects. */ private static class AspectPrecedenceCalculator { private World world; private Map cachedResults; public AspectPrecedenceCalculator(World forSomeWorld) { this.world = forSomeWorld;
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
this.cachedResults = new HashMap(); } /** * Ask every declare precedence in the world to order the two aspects. * If more than one declare precedence gives an ordering, and the orderings * conflict, then that's an error. */ public int compareByPrecedence(ResolvedType firstAspect, ResolvedType secondAspect) { PrecedenceCacheKey key = new PrecedenceCacheKey(firstAspect,secondAspect); if (cachedResults.containsKey(key)) { return ((Integer) cachedResults.get(key)).intValue(); } else { int order = 0; DeclarePrecedence orderer = null; for (Iterator i = world.getCrosscuttingMembersSet().getDeclareDominates().iterator(); i.hasNext(); ) { DeclarePrecedence d = (DeclarePrecedence)i.next(); int thisOrder = d.compare(firstAspect, secondAspect); if (thisOrder != 0) { if (orderer==null) orderer = d; if (order != 0 && order != thisOrder) { ISourceLocation[] isls = new ISourceLocation[2]; isls[0]=orderer.getSourceLocation(); isls[1]=d.getSourceLocation(); Message m = new Message("conflicting declare precedence orderings for aspects: "+ firstAspect.getName()+" and "+secondAspect.getName(),null,true,isls); world.getMessageHandler().handleMessage(m); } else { order = thisOrder;
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
} } } cachedResults.put(key, new Integer(order)); return order; } } public Integer getPrecedenceIfAny(ResolvedType aspect1,ResolvedType aspect2) { return (Integer)cachedResults.get(new PrecedenceCacheKey(aspect1,aspect2)); } public int compareByPrecedenceAndHierarchy(ResolvedType firstAspect, ResolvedType secondAspect) { if (firstAspect.equals(secondAspect)) return 0; int ret = compareByPrecedence(firstAspect, secondAspect); if (ret != 0) return ret; if (firstAspect.isAssignableFrom(secondAspect)) return -1; else if (secondAspect.isAssignableFrom(firstAspect)) return +1; return 0; } private static class PrecedenceCacheKey { public ResolvedType aspect1; public ResolvedType aspect2; public PrecedenceCacheKey(ResolvedType a1, ResolvedType a2) { this.aspect1 = a1;
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
this.aspect2 = a2; } public boolean equals(Object obj) { if (!(obj instanceof PrecedenceCacheKey)) return false; PrecedenceCacheKey other = (PrecedenceCacheKey) obj; return (aspect1 == other.aspect1 && aspect2 == other.aspect2); } public int hashCode() { return aspect1.hashCode() + aspect2.hashCode(); } } } public void validateType(UnresolvedType type) { } private Map workInProgress1 = new HashMap(); public TypeVariable[] getTypeVariablesCurrentlyBeingProcessed(Class baseClass) { return (TypeVariable[])workInProgress1.get(baseClass); } public void recordTypeVariablesCurrentlyBeingProcessed(Class baseClass, TypeVariable[] typeVariables) { workInProgress1.put(baseClass,typeVariables); } public void forgetTypeVariablesCurrentlyBeingProcessed(Class baseClass) { workInProgress1.remove(baseClass); }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
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) { if (isASMAround) { String s = p.getProperty(xsetACTIVATE_LIGHTWEIGHT_DELEGATES,"true"); fastDelegateSupportEnabled = s.equalsIgnoreCase("true"); if (!fastDelegateSupportEnabled) getMessageHandler().handleMessage(MessageUtil.info("[activateLightweightDelegates=false] Disabling optimization to use lightweight delegates for non-woven types")); } String s = p.getProperty(xsetBCEL_REPOSITORY_CACHING,xsetBCEL_REPOSITORY_CACHING_DEFAULT); bcelRepositoryCaching = s.equalsIgnoreCase("true"); if (!bcelRepositoryCaching) { getMessageHandler().handleMessage(MessageUtil.info("[bcelRepositoryCaching=false] AspectJ will not use a bcel cache for class information")); } s = p.getProperty(xsetPIPELINE_COMPILATION,xsetPIPELINE_COMPILATION_DEFAULT); shouldPipelineCompilation = s.equalsIgnoreCase("true"); s = p.getProperty(xsetCOMPLETE_BINARY_TYPES,xsetCOMPLETE_BINARY_TYPES_DEFAULT);
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
completeBinaryTypes = s.equalsIgnoreCase("true"); if (completeBinaryTypes) { getMessageHandler().handleMessage(MessageUtil.info("[completeBinaryTypes=true] Completion of binary types activated")); } s = p.getProperty(xsetRUN_MINIMAL_MEMORY,"false"); runMinimalMemory = s.equalsIgnoreCase("true"); s = p.getProperty(xsetDEBUG_STRUCTURAL_CHANGES_CODE,"false"); forDEBUG_structuralChangesCode = s.equalsIgnoreCase("true"); s = p.getProperty(xsetDEBUG_BRIDGING,"false"); forDEBUG_bridgingCode = s.equalsIgnoreCase("true"); } checkedAdvancedConfiguration=true; } } public boolean isRunMinimalMemory() { ensureAdvancedConfigurationProcessed(); return runMinimalMemory; } public boolean shouldPipelineCompilation() { ensureAdvancedConfigurationProcessed(); return shouldPipelineCompilation; }
220,686
Bug 220686 unsynchronized access to WeakHashMap
null
resolved fixed
caf8960
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-02-28T20:50:38Z
2008-02-28T00:53:20Z
weaver/src/org/aspectj/weaver/World.java
public void setFastDelegateSupport(boolean b) { if (b && !isASMAround) { throw new BCException("Unable to activate fast delegate support, ASM classes cannot be found"); } fastDelegateSupportEnabled = b; } public boolean isFastDelegateSupportEnabled() { return false; } public void setIncrementalCompileCouldFollow(boolean b) {incrementalCompileCouldFollow = b;} public boolean couldIncrementalCompileFollow() {return incrementalCompileCouldFollow;} public void setSynchronizationPointcutsInUse() { if (trace.isTraceEnabled()) trace.enter("setSynchronizationPointcutsInUse", this); synchronizationPointcutsInUse =true; if (trace.isTraceEnabled()) trace.exit("setSynchronizationPointcutsInUse"); } public boolean areSynchronizationPointcutsInUse() {return synchronizationPointcutsInUse;} public boolean isASMAround() { return isASMAround; } public ResolvedType[] getAllTypes() { return typeMap.getAllTypes(); } }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
/* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http:www.eclipse.org/legal/epl-v10.html * * Contributors: * PARC initial implementation * Alexandre Vasseur support for @AJ aspects * ******************************************************************/ package org.aspectj.weaver.bcel; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileFilter; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList;
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.jar.Attributes; import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.jar.Manifest; import java.util.jar.Attributes.Name; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; import org.aspectj.apache.bcel.classfile.ClassParser; import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.asm.AsmManager; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.IProgressListener; import org.aspectj.bridge.ISourceLocation; import org.aspectj.bridge.Message; import org.aspectj.bridge.MessageUtil; import org.aspectj.bridge.SourceLocation; import org.aspectj.bridge.WeaveMessage; import org.aspectj.bridge.context.CompilationAndWeavingContext; import org.aspectj.bridge.context.ContextToken;
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
import org.aspectj.util.FileUtil; import org.aspectj.util.FuzzyBoolean; import org.aspectj.weaver.Advice; import org.aspectj.weaver.AnnotationOnTypeMunger; import org.aspectj.weaver.AnnotationX; import org.aspectj.weaver.AsmRelationshipProvider; import org.aspectj.weaver.BCException; import org.aspectj.weaver.ConcreteTypeMunger; import org.aspectj.weaver.CrosscuttingMembersSet; import org.aspectj.weaver.CustomMungerFactory; import org.aspectj.weaver.IClassFileProvider; import org.aspectj.weaver.IWeaveRequestor; import org.aspectj.weaver.IWeaver; import org.aspectj.weaver.NewParentTypeMunger; import org.aspectj.weaver.ReferenceType; import org.aspectj.weaver.ReferenceTypeDelegate; import org.aspectj.weaver.ResolvedTypeMunger; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.Shadow; import org.aspectj.weaver.ShadowMunger; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.WeaverMessages; import org.aspectj.weaver.WeaverMetrics; import org.aspectj.weaver.WeaverStateInfo; import org.aspectj.weaver.World; import org.aspectj.weaver.patterns.AndPointcut; import org.aspectj.weaver.patterns.BindingAnnotationTypePattern; import org.aspectj.weaver.patterns.BindingTypePattern; import org.aspectj.weaver.patterns.CflowPointcut; import org.aspectj.weaver.patterns.ConcreteCflowPointcut;
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
import org.aspectj.weaver.patterns.DeclareAnnotation; import org.aspectj.weaver.patterns.DeclareParents; import org.aspectj.weaver.patterns.FastMatchInfo; import org.aspectj.weaver.patterns.IfPointcut; import org.aspectj.weaver.patterns.KindedPointcut; import org.aspectj.weaver.patterns.NameBindingPointcut; import org.aspectj.weaver.patterns.NotPointcut; import org.aspectj.weaver.patterns.OrPointcut; import org.aspectj.weaver.patterns.Pointcut; import org.aspectj.weaver.patterns.PointcutRewriter; import org.aspectj.weaver.patterns.WithinPointcut; import org.aspectj.weaver.tools.Trace; import org.aspectj.weaver.tools.TraceFactory; public class BcelWeaver implements IWeaver { private BcelWorld world; private CrosscuttingMembersSet xcutSet; private IProgressListener progressListener = null; private double progressMade; private double progressPerClassFile; private boolean inReweavableMode = false; private static Trace trace = TraceFactory.getTraceFactory().getTrace(BcelWeaver.class); public BcelWeaver(BcelWorld world) { super(); if (trace.isTraceEnabled()) trace.enter("<init>",this,world); WeaverMetrics.reset(); this.world = world; this.xcutSet = world.getCrosscuttingMembersSet(); if (trace.isTraceEnabled()) trace.exit("<init>"); }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
public BcelWeaver() { this(new BcelWorld()); } private List addedClasses = new ArrayList(); private List deletedTypenames = new ArrayList(); private Manifest manifest = null; private boolean needToReweaveWorld = false; private boolean isBatchWeave = true; private List shadowMungerList = null; private List typeMungerList = null; private List lateTypeMungerList = null; private List declareParentsList = null; private ZipOutputStream zipOutputStream; private CustomMungerFactory customMungerFactory; ---- public void setShadowMungers(List l) { shadowMungerList = l; } /** * Add the given aspect to the weaver. * The type is resolved to support DOT for static inner classes as well as DOLLAR * * @param aspectName * @return aspect */
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
public ResolvedType addLibraryAspect(String aspectName) { if (trace.isTraceEnabled()) trace.enter("addLibraryAspect",this,aspectName); UnresolvedType unresolvedT = UnresolvedType.forName(aspectName); unresolvedT.setNeedsModifiableDelegate(true); ResolvedType type = world.resolve(unresolvedT, true); if (type.isMissing()) { String fixedName = aspectName; int hasDot = fixedName.lastIndexOf('.'); while (hasDot > 0) { char[] fixedNameChars = fixedName.toCharArray(); fixedNameChars[hasDot] = '$'; fixedName = new String(fixedNameChars); hasDot = fixedName.lastIndexOf('.'); UnresolvedType ut = UnresolvedType.forName(fixedName); ut.setNeedsModifiableDelegate(true); type = world.resolve(ut, true); if (!type.isMissing()) { break; } } } if (type.isAspect()) { WeaverStateInfo wsi = type.getWeaverState(); if (wsi != null && wsi.isReweavable()) {
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
BcelObjectType classType = getClassType(type.getName()); JavaClass wovenJavaClass = classType.getJavaClass(); JavaClass unwovenJavaClass = Utility.makeJavaClass(wovenJavaClass.getFileName(), wsi.getUnwovenClassFileData(wovenJavaClass.getBytes())); world.storeClass(unwovenJavaClass); classType.setJavaClass(unwovenJavaClass); } xcutSet.addOrReplaceAspect(type); if (trace.isTraceEnabled()) trace.exit("addLibraryAspect",type); return type; } else { RuntimeException ex = new RuntimeException("Cannot register non aspect: " + type.getName() + " , " + aspectName); if (trace.isTraceEnabled()) trace.exit("addLibraryAspect",ex); throw ex; } } /** * * @param inFile File path to class directory or zip/jar class archive * @throws IOException */ public void addLibraryJarFile(File inFile) throws IOException { List addedAspects = null; if (inFile.isDirectory()) { addedAspects = addAspectsFromDirectory(inFile);
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} else { addedAspects = addAspectsFromJarFile(inFile); } for (Iterator i = addedAspects.iterator(); i.hasNext();) { ResolvedType aspectX = (ResolvedType) i.next(); xcutSet.addOrReplaceAspect(aspectX); } } private List addAspectsFromJarFile(File inFile) throws FileNotFoundException, IOException { ZipInputStream inStream = new ZipInputStream(new FileInputStream(inFile)); List addedAspects = new ArrayList(); while (true) { ZipEntry entry = inStream.getNextEntry(); if (entry == null) break; if (entry.isDirectory() || !entry.getName().endsWith(".class")) { continue; } ClassParser parser = new ClassParser(new ByteArrayInputStream(FileUtil.readAsByteArray(inStream)), entry.getName()); JavaClass jc = parser.parse(); inStream.closeEntry(); ResolvedType type = world.addSourceObjectType(jc).getResolvedTypeX(); type.setBinaryPath(inFile.getAbsolutePath()); if (type.isAspect()) { addedAspects.add(type); }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} inStream.close(); return addedAspects; } private List addAspectsFromDirectory(File dir) throws FileNotFoundException, IOException{ List addedAspects = new ArrayList(); File[] classFiles = FileUtil.listFiles(dir,new FileFilter(){ public boolean accept(File pathname) { return pathname.getName().endsWith(".class"); } }); for (int i = 0; i < classFiles.length; i++) { FileInputStream fis = new FileInputStream(classFiles[i]); byte[] bytes = FileUtil.readAsByteArray(fis); addIfAspect(bytes,classFiles[i].getAbsolutePath(),addedAspects); fis.close(); } return addedAspects; } private void addIfAspect(byte[] bytes, String name, List toList) throws IOException { ClassParser parser = new ClassParser(new ByteArrayInputStream(bytes),name); JavaClass jc = parser.parse(); ResolvedType type = world.addSourceObjectType(jc).getResolvedTypeX(); String typeName = type.getName().replace('.', File.separatorChar); int end = name.indexOf(typeName);
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
String binaryPath = name.substring(0,end-1); type.setBinaryPath(binaryPath); if (type.isAspect()) { toList.add(type); } } /** * Add any .class files in the directory to the outdir. Anything other than .class files in * the directory (or its subdirectories) are considered resources and are also copied. * */ public List addDirectoryContents(File inFile,File outDir) throws IOException { List addedClassFiles = new ArrayList(); File[] files = FileUtil.listFiles(inFile,new FileFilter() { public boolean accept(File f) { boolean accept = !f.isDirectory(); return accept; } }); for (int i = 0; i < files.length; i++) { addedClassFiles.add(addClassFile(files[i],inFile,outDir)); } return addedClassFiles; } /** Adds all class files in the jar
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
*/ public List addJarFile(File inFile, File outDir, boolean canBeDirectory){ List addedClassFiles = new ArrayList(); needToReweaveWorld = true; JarFile inJar = null; try { if (inFile.isDirectory() && canBeDirectory) { addedClassFiles.addAll(addDirectoryContents(inFile,outDir)); } else { inJar = new JarFile(inFile); addManifest(inJar.getManifest()); Enumeration entries = inJar.entries(); while (entries.hasMoreElements()) { JarEntry entry = (JarEntry)entries.nextElement(); InputStream inStream = inJar.getInputStream(entry); byte[] bytes = FileUtil.readAsByteArray(inStream); String filename = entry.getName(); UnwovenClassFile classFile = new UnwovenClassFile(new File(outDir, filename).getAbsolutePath(), bytes); if (filename.endsWith(".class")) { this.addClassFile(classFile); addedClassFiles.add(classFile); } } inStream.close(); }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
inJar.close(); } } catch (FileNotFoundException ex) { IMessage message = new Message( "Could not find input jar file " + inFile.getPath() + ", ignoring", new SourceLocation(inFile,0), false); world.getMessageHandler().handleMessage(message); } catch (IOException ex) { IMessage message = new Message( "Could not read input jar file " + inFile.getPath() + "(" + ex.getMessage() + ")", new SourceLocation(inFile,0), true); world.getMessageHandler().handleMessage(message); } finally { if (inJar != null) { try {inJar.close();} catch (IOException ex) { IMessage message = new Message( "Could not close input jar file " + inFile.getPath() + "(" + ex.getMessage() + ")", new SourceLocation(inFile,0), true); world.getMessageHandler().handleMessage(message); } } } return addedClassFiles; } }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} public boolean needToReweaveWorld() { return needToReweaveWorld; } /** Should be addOrReplace */ public void addClassFile(UnwovenClassFile classFile) { addedClasses.add(classFile); } world.addSourceObjectType(classFile.getJavaClass()); } public UnwovenClassFile addClassFile(File classFile, File inPathDir, File outDir) throws IOException { FileInputStream fis = new FileInputStream(classFile); byte[] bytes = FileUtil.readAsByteArray(fis); String filename = classFile.getAbsolutePath().substring( inPathDir.getAbsolutePath().length()+1); UnwovenClassFile ucf = new UnwovenClassFile(new File(outDir,filename).getAbsolutePath(),bytes); if (filename.endsWith(".class")) { this.addClassFile(ucf); } fis.close(); return ucf; }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
public void deleteClassFile(String typename) { deletedTypenames.add(typename); world.deleteSourceObjectType(UnresolvedType.forName(typename)); } } } } public void setIsBatchWeave(boolean b) { isBatchWeave=b; } public void prepareForWeave() { if (trace.isTraceEnabled()) trace.enter("prepareForWeave",this); needToReweaveWorld = xcutSet.hasChangedSinceLastReset(); CflowPointcut.clearCaches(); for (Iterator i = addedClasses.iterator(); i.hasNext(); ) { UnwovenClassFile jc = (UnwovenClassFile)i.next(); String name = jc.getClassName(); ResolvedType type = world.resolve(name); if (type.isAspect()) { needToReweaveWorld |= xcutSet.addOrReplaceAspect(type); } } for (Iterator i = deletedTypenames.iterator(); i.hasNext(); ) { String name = (String)i.next(); if (xcutSet.deleteAspect(UnresolvedType.forName(name))) needToReweaveWorld = true;
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} shadowMungerList = xcutSet.getShadowMungers(); rewritePointcuts(shadowMungerList); typeMungerList = xcutSet.getTypeMungers(); lateTypeMungerList = xcutSet.getLateTypeMungers(); declareParentsList = xcutSet.getDeclareParents(); addCustomMungers(); Collections.sort( shadowMungerList, new Comparator() { public int compare(Object o1, Object o2) { ShadowMunger sm1 = (ShadowMunger)o1; ShadowMunger sm2 = (ShadowMunger)o2; if (sm1.getSourceLocation()==null) return (sm2.getSourceLocation()==null?0:1); if (sm2.getSourceLocation()==null) return -1;
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
return (sm2.getSourceLocation().getOffset()-sm1.getSourceLocation().getOffset()); } }); if (inReweavableMode) world.showMessage(IMessage.INFO, WeaverMessages.format(WeaverMessages.REWEAVABLE_MODE), null, null); if (trace.isTraceEnabled()) trace.exit("prepareForWeave"); } private void addCustomMungers() { if (customMungerFactory != null) { for (Iterator i = addedClasses.iterator(); i.hasNext();) { UnwovenClassFile jc = (UnwovenClassFile) i.next(); String name = jc.getClassName(); ResolvedType type = world.resolve(name); if (type.isAspect()) { Collection shadowMungers = customMungerFactory.createCustomShadowMungers(type); if (shadowMungers != null) { shadowMungerList.addAll(shadowMungers); } Collection typeMungers = customMungerFactory .createCustomTypeMungers(type); if (typeMungers != null) typeMungerList.addAll(typeMungers); } } }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} public void setCustomMungerFactory(CustomMungerFactory factory) { customMungerFactory = factory; } /* * Rewrite all of the pointcuts in the world into their most efficient * form for subsequent matching. Also ensure that if pc1.equals(pc2) * then pc1 == pc2 (for non-binding pcds) by making references all * point to the same instance. * Since pointcuts remember their match decision on the last shadow, * this makes matching faster when many pointcuts share common elements, * or even when one single pointcut has one common element (which can * be a side-effect of DNF rewriting). */ private void rewritePointcuts(List shadowMungers) { PointcutRewriter rewriter = new PointcutRewriter(); for (Iterator iter = shadowMungers.iterator(); iter.hasNext();) { ShadowMunger munger = (ShadowMunger) iter.next(); Pointcut p = munger.getPointcut(); Pointcut newP = rewriter.rewrite(p); text. if (munger instanceof Advice) { Advice advice = (Advice) munger; if (advice.getSignature() != null) { final int numFormals; final String names[];
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
if (advice.getConcreteAspect().isAnnotationStyleAspect() && advice.getDeclaringAspect()!=null && advice.getDeclaringAspect().resolve(world).isAnnotationStyleAspect()) { numFormals = advice.getBaseParameterCount(); int numArgs = advice.getSignature().getParameterTypes().length; if (numFormals > 0) { names = advice.getSignature().getParameterNames(world); validateBindings(newP,p,numArgs,names); } } else { numFormals = advice.getBaseParameterCount(); if (numFormals > 0) { names = advice.getBaseParameterNames(world); validateBindings(newP,p,numFormals,names); } } } } munger.setPointcut(newP); } Map pcMap = new HashMap(); for (Iterator iter = shadowMungers.iterator(); iter.hasNext();) { ShadowMunger munger = (ShadowMunger) iter.next();
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
Pointcut p = munger.getPointcut(); munger.setPointcut(shareEntriesFromMap(p,pcMap)); } } private Pointcut shareEntriesFromMap(Pointcut p,Map pcMap) { if (p instanceof NameBindingPointcut) return p; if (p instanceof IfPointcut) return p; if (p instanceof ConcreteCflowPointcut) return p; if (p instanceof AndPointcut) { AndPointcut apc = (AndPointcut) p; Pointcut left = shareEntriesFromMap(apc.getLeft(),pcMap); Pointcut right = shareEntriesFromMap(apc.getRight(),pcMap); return new AndPointcut(left,right); } else if (p instanceof OrPointcut) { OrPointcut opc = (OrPointcut) p; Pointcut left = shareEntriesFromMap(opc.getLeft(),pcMap); Pointcut right = shareEntriesFromMap(opc.getRight(),pcMap); return new OrPointcut(left,right); } else if (p instanceof NotPointcut) { NotPointcut npc = (NotPointcut) p; Pointcut not = shareEntriesFromMap(npc.getNegatedPointcut(),pcMap); return new NotPointcut(not); } else { if (pcMap.containsKey(p)) { return (Pointcut) pcMap.get(p); } else { pcMap.put(p,p);
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
return p; } } } private void validateBindings(Pointcut dnfPointcut, Pointcut userPointcut, int numFormals, String[] names) { if (numFormals == 0) return; if (dnfPointcut.couldMatchKinds()==Shadow.NO_SHADOW_KINDS_BITS) return; if (dnfPointcut instanceof OrPointcut) { OrPointcut orBasedDNFPointcut = (OrPointcut) dnfPointcut; Pointcut[] leftBindings = new Pointcut[numFormals]; Pointcut[] rightBindings = new Pointcut[numFormals]; validateOrBranch(orBasedDNFPointcut,userPointcut,numFormals,names,leftBindings,rightBindings); } else { Pointcut[] bindings = new Pointcut[numFormals]; validateSingleBranch(dnfPointcut, userPointcut, numFormals, names,bindings); } } private void validateOrBranch(OrPointcut pc, Pointcut userPointcut, int numFormals, String[] names, Pointcut[] leftBindings, Pointcut[] rightBindings) { Pointcut left = pc.getLeft(); Pointcut right = pc.getRight(); if (left instanceof OrPointcut) {
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
Pointcut[] newRightBindings = new Pointcut[numFormals]; validateOrBranch((OrPointcut)left,userPointcut,numFormals,names,leftBindings,newRightBindings); } else { if (left.couldMatchKinds()!=Shadow.NO_SHADOW_KINDS_BITS) validateSingleBranch(left, userPointcut, numFormals, names, leftBindings); } if (right instanceof OrPointcut) { Pointcut[] newLeftBindings = new Pointcut[numFormals]; validateOrBranch((OrPointcut)right,userPointcut,numFormals,names,newLeftBindings,rightBindings); } else { if (right.couldMatchKinds()!=Shadow.NO_SHADOW_KINDS_BITS) validateSingleBranch(right, userPointcut, numFormals, names, rightBindings); } int kindsInCommon = left.couldMatchKinds() & right.couldMatchKinds(); if (kindsInCommon!=Shadow.NO_SHADOW_KINDS_BITS && couldEverMatchSameJoinPoints(left,right)) { List ambiguousNames = new ArrayList(); for (int i = 0; i < numFormals; i++) { if (leftBindings[i] == null) { if (rightBindings[i] != null) { ambiguousNames.add(names[i]); } } else if (!leftBindings[i].equals(rightBindings[i])) { ambiguousNames.add(names[i]); } } if (!ambiguousNames.isEmpty()) raiseAmbiguityInDisjunctionError(userPointcut,ambiguousNames); }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} private void validateSingleBranch(Pointcut pc, Pointcut userPointcut, int numFormals, String[] names, Pointcut[] bindings) { boolean[] foundFormals = new boolean[numFormals]; for (int i = 0; i < foundFormals.length; i++) { foundFormals[i] = false; } validateSingleBranchRecursion(pc, userPointcut, foundFormals, names, bindings); for (int i = 0; i < foundFormals.length; i++) { if (!foundFormals[i]) { boolean ignore = false; for (int j = 0; j < userPointcut.m_ignoreUnboundBindingForNames.length; j++) { if (names[i] != null && names[i].equals(userPointcut.m_ignoreUnboundBindingForNames[j])) { ignore = true; break; } } if (!ignore) { raiseUnboundFormalError(names[i],userPointcut); } } } } private void validateSingleBranchRecursion(Pointcut pc, Pointcut userPointcut, boolean[] foundFormals, String[] names, Pointcut[] bindings) {
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
if (pc instanceof NotPointcut) { NotPointcut not = (NotPointcut) pc; if (not.getNegatedPointcut() instanceof NameBindingPointcut) { NameBindingPointcut nnbp = (NameBindingPointcut) not.getNegatedPointcut(); if (!nnbp.getBindingAnnotationTypePatterns().isEmpty() && !nnbp.getBindingTypePatterns().isEmpty()) raiseNegationBindingError(userPointcut); } } else if (pc instanceof AndPointcut) { AndPointcut and = (AndPointcut) pc; validateSingleBranchRecursion(and.getLeft(), userPointcut,foundFormals,names,bindings); validateSingleBranchRecursion(and.getRight(),userPointcut,foundFormals,names,bindings); } else if (pc instanceof NameBindingPointcut) { List btps = ((NameBindingPointcut)pc).getBindingTypePatterns(); for (Iterator iter = btps.iterator(); iter.hasNext();) { BindingTypePattern btp = (BindingTypePattern) iter.next(); int index = btp.getFormalIndex(); bindings[index] = pc; if (foundFormals[index]) { raiseAmbiguousBindingError(names[index],userPointcut); } else { foundFormals[index] = true; } } List baps = ((NameBindingPointcut)pc).getBindingAnnotationTypePatterns(); for (Iterator iter = baps.iterator(); iter.hasNext();) { BindingAnnotationTypePattern bap = (BindingAnnotationTypePattern) iter.next(); int index = bap.getFormalIndex(); bindings[index] = pc; if (foundFormals[index]) {
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
raiseAmbiguousBindingError(names[index],userPointcut); } else { foundFormals[index] = true; } } } else if (pc instanceof ConcreteCflowPointcut) { ConcreteCflowPointcut cfp = (ConcreteCflowPointcut) pc; int[] slots = cfp.getUsedFormalSlots(); for (int i = 0; i < slots.length; i++) { bindings[slots[i]] = cfp; if (foundFormals[slots[i]]) { raiseAmbiguousBindingError(names[slots[i]],userPointcut); } else { foundFormals[slots[i]] = true; } } } } private boolean couldEverMatchSameJoinPoints(Pointcut left, Pointcut right) { if (left instanceof OrPointcut) { OrPointcut leftOrPointcut = (OrPointcut)left; if (couldEverMatchSameJoinPoints(leftOrPointcut.getLeft(),right)) return true;
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
if (couldEverMatchSameJoinPoints(leftOrPointcut.getRight(),right)) return true; return false; } if (right instanceof OrPointcut) { OrPointcut rightOrPointcut = (OrPointcut)right; if (couldEverMatchSameJoinPoints(left,rightOrPointcut.getLeft())) return true; if (couldEverMatchSameJoinPoints(left,rightOrPointcut.getRight())) return true; return false; } WithinPointcut leftWithin = (WithinPointcut) findFirstPointcutIn(left,WithinPointcut.class); WithinPointcut rightWithin = (WithinPointcut) findFirstPointcutIn(right,WithinPointcut.class); if ((leftWithin != null) && (rightWithin != null)) { if (!leftWithin.couldEverMatchSameJoinPointsAs(rightWithin)) return false; } KindedPointcut leftKind = (KindedPointcut) findFirstPointcutIn(left,KindedPointcut.class); KindedPointcut rightKind = (KindedPointcut) findFirstPointcutIn(right,KindedPointcut.class); if ((leftKind != null) && (rightKind != null)) { if (!leftKind.couldEverMatchSameJoinPointsAs(rightKind)) return false; } return true; } private Pointcut findFirstPointcutIn(Pointcut toSearch, Class toLookFor) { if (toSearch instanceof NotPointcut) return null; if (toLookFor.isInstance(toSearch)) return toSearch; if (toSearch instanceof AndPointcut) { AndPointcut apc = (AndPointcut) toSearch;
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
Pointcut left = findFirstPointcutIn(apc.getLeft(),toLookFor); if (left != null) return left; return findFirstPointcutIn(apc.getRight(),toLookFor); } return null; } /** * @param userPointcut */ private void raiseNegationBindingError(Pointcut userPointcut) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.NEGATION_DOESNT_ALLOW_BINDING), userPointcut.getSourceContext().makeSourceLocation(userPointcut),null); } /** * @param name * @param userPointcut */ private void raiseAmbiguousBindingError(String name, Pointcut userPointcut) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.AMBIGUOUS_BINDING, name), userPointcut.getSourceContext().makeSourceLocation(userPointcut),null); } /** * @param userPointcut */ private void raiseAmbiguityInDisjunctionError(Pointcut userPointcut, List names) { StringBuffer formalNames = new StringBuffer(names.get(0).toString());
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
for (int i = 1; i < names.size(); i++) { formalNames.append(", "); formalNames.append(names.get(i)); } world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.AMBIGUOUS_BINDING_IN_OR,formalNames), userPointcut.getSourceContext().makeSourceLocation(userPointcut),null); } /** * @param name * @param userPointcut */ private void raiseUnboundFormalError(String name, Pointcut userPointcut) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.UNBOUND_FORMAL, name), userPointcut.getSourceContext().makeSourceLocation(userPointcut),null); } } } } } } } }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
public void addManifest (Manifest newManifest) { if (manifest == null) { manifest = newManifest; } } public static final String MANIFEST_NAME = "META-INF/MANIFEST.MF"; private static final String WEAVER_MANIFEST_VERSION = "1.0"; private static final Attributes.Name CREATED_BY = new Name("Created-By"); private static final String WEAVER_CREATED_BY = "AspectJ Compiler"; public Manifest getManifest (boolean shouldCreate) { if (manifest == null && shouldCreate) { manifest = new Manifest(); Attributes attributes = manifest.getMainAttributes(); attributes.put(Name.MANIFEST_VERSION,WEAVER_MANIFEST_VERSION); attributes.put(CREATED_BY,WEAVER_CREATED_BY); } return manifest; } public Collection weave(File file) throws IOException { OutputStream os = FileUtil.makeOutputStream(file); this.zipOutputStream = new ZipOutputStream(os);
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
prepareForWeave(); Collection c = weave( new IClassFileProvider() { public boolean isApplyAtAspectJMungersOnly() { return false; } public Iterator getClassFileIterator() { return addedClasses.iterator(); } public IWeaveRequestor getRequestor() { return new IWeaveRequestor() { public void acceptResult(UnwovenClassFile result) { try { writeZipEntry(result.filename, result.bytes); } catch(IOException ex) {} } public void processingReweavableState() {} public void addingTypeMungers() {} public void weavingAspects() {} public void weavingClasses() {} public void weaveCompleted() {} }; } }); zipOutputStream.close(); return c; } }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} public Collection weave(IClassFileProvider input) throws IOException { if (trace.isTraceEnabled()) trace.enter("weave",this,input); ContextToken weaveToken = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.WEAVING, ""); Collection wovenClassNames = new ArrayList(); IWeaveRequestor requestor = input.getRequestor(); for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) { UnwovenClassFile classFile = (UnwovenClassFile)i.next(); if (AsmManager.isCreatingModel() && !isBatchWeave) { AsmManager.getDefault().removeRelationshipsTargettingThisType(classFile.getClassName()); } } for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) { UnwovenClassFile classFile = (UnwovenClassFile)i.next();
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
String className = classFile.getClassName(); ResolvedType theType = world.resolve(className); if (theType!=null) { BcelObjectType classType = BcelWorld.getBcelObjectType(theType); if (classType!=null) classType.ensureDelegateConsistent(); } } if (input.isApplyAtAspectJMungersOnly()) { ContextToken atAspectJMungersOnly = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_ATASPECTJTYPE_MUNGERS_ONLY, ""); requestor.weavingAspects(); ContextToken aspectToken = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.WEAVING_ASPECTS, ""); for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) { UnwovenClassFile classFile = (UnwovenClassFile)i.next(); String className = classFile.getClassName(); ResolvedType theType = world.resolve(className); if (theType.isAnnotationStyleAspect()) { BcelObjectType classType = BcelWorld.getBcelObjectType(theType); if (classType==null) { throw new BCException("Can't find bcel delegate for "+className+" type="+theType.getClass()); } LazyClassGen clazz = classType.getLazyClassGen(); BcelPerClauseAspectAdder selfMunger = new BcelPerClauseAspectAdder(theType, theType.getPerClause().getKind()); selfMunger.forceMunge(clazz, true); classType.finishedWith(); UnwovenClassFile[] newClasses = getClassFilesFor(clazz); for (int news = 0; news < newClasses.length; news++) { requestor.acceptResult(newClasses[news]); } wovenClassNames.add(classFile.getClassName());
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} } requestor.weaveCompleted(); CompilationAndWeavingContext.leavingPhase(atAspectJMungersOnly); return wovenClassNames; } requestor.processingReweavableState(); ContextToken reweaveToken = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_REWEAVABLE_STATE,""); prepareToProcessReweavableState(); for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) { UnwovenClassFile classFile = (UnwovenClassFile)i.next(); String className = classFile.getClassName(); BcelObjectType classType = getClassType(className); if (classType !=null) { ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_REWEAVABLE_STATE, className); processReweavableStateIfPresent(className, classType); CompilationAndWeavingContext.leavingPhase(tok); } } CompilationAndWeavingContext.leavingPhase(reweaveToken); ContextToken typeMungingToken = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_TYPE_MUNGERS,""); requestor.addingTypeMungers();
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
List typesToProcess = new ArrayList(); for (Iterator iter = input.getClassFileIterator(); iter.hasNext();) { UnwovenClassFile clf = (UnwovenClassFile) iter.next(); typesToProcess.add(clf.getClassName()); } while (typesToProcess.size()>0) { weaveParentsFor(typesToProcess,(String)typesToProcess.get(0)); } for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) { UnwovenClassFile classFile = (UnwovenClassFile)i.next(); String className = classFile.getClassName(); addNormalTypeMungers(className); } CompilationAndWeavingContext.leavingPhase(typeMungingToken); requestor.weavingAspects(); ContextToken aspectToken = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.WEAVING_ASPECTS, ""); for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) { UnwovenClassFile classFile = (UnwovenClassFile)i.next(); String className = classFile.getClassName(); ResolvedType theType = world.resolve(className); if (theType.isAspect()) { BcelObjectType classType = BcelWorld.getBcelObjectType(theType);
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
if (classType==null) { ReferenceTypeDelegate theDelegate = ((ReferenceType)theType).getDelegate(); if (theDelegate.getClass().getName().endsWith("EclipseSourceType")) continue; throw new BCException("Can't find bcel delegate for "+className+" type="+theType.getClass()); } weaveAndNotify(classFile, classType,requestor); wovenClassNames.add(className); } } CompilationAndWeavingContext.leavingPhase(aspectToken); requestor.weavingClasses(); ContextToken classToken = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.WEAVING_CLASSES, ""); for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) { UnwovenClassFile classFile = (UnwovenClassFile)i.next(); String className = classFile.getClassName(); ResolvedType theType = world.resolve(className); if (!theType.isAspect()) { BcelObjectType classType = BcelWorld.getBcelObjectType(theType); if (classType==null) { ReferenceTypeDelegate theDelegate = ((ReferenceType)theType).getDelegate();
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
if (theDelegate.getClass().getName().endsWith("EclipseSourceType")) continue; throw new BCException("Can't find bcel delegate for "+className+" type="+theType.getClass()); } weaveAndNotify(classFile, classType, requestor); wovenClassNames.add(className); } } CompilationAndWeavingContext.leavingPhase(classToken); addedClasses = new ArrayList(); deletedTypenames = new ArrayList(); requestor.weaveCompleted(); CompilationAndWeavingContext.leavingPhase(weaveToken); if (trace.isTraceEnabled()) trace.exit("weave",wovenClassNames); return wovenClassNames; } public void allWeavingComplete() { warnOnUnmatchedAdvice(); } /** * In 1.5 mode and with XLint:adviceDidNotMatch enabled, put out messages for any * mungers that did not match anything. */ private void warnOnUnmatchedAdvice() { class AdviceLocation {
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
private int lineNo; private UnresolvedType inAspect; public AdviceLocation(BcelAdvice advice) { this.lineNo = advice.getSourceLocation().getLine(); this.inAspect = advice.getDeclaringAspect(); } public boolean equals(Object obj) { if (!(obj instanceof AdviceLocation)) return false; AdviceLocation other = (AdviceLocation) obj; if (this.lineNo != other.lineNo) return false; if (!this.inAspect.equals(other.inAspect)) return false; return true; } public int hashCode() { return 37 + 17*lineNo + 17*inAspect.hashCode(); }; } if (world.isInJava5Mode() && world.getLint().adviceDidNotMatch.isEnabled()) {
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
List l = world.getCrosscuttingMembersSet().getShadowMungers(); Set alreadyWarnedLocations = new HashSet(); for (Iterator iter = l.iterator(); iter.hasNext();) { ShadowMunger element = (ShadowMunger) iter.next(); if (element instanceof BcelAdvice) { BcelAdvice ba = (BcelAdvice)element; if (!ba.hasMatchedSomething()) { if (ba.getSignature()!=null) { AdviceLocation loc = new AdviceLocation(ba); if (alreadyWarnedLocations.contains(loc)) { continue; } else { alreadyWarnedLocations.add(loc); } if (!(ba.getSignature() instanceof BcelMethod) || !Utility.isSuppressing((AnnotationX[])ba.getSignature().getAnnotations(),"adviceDidNotMatch")) { world.getLint().adviceDidNotMatch.signal(ba.getDeclaringAspect().toString(), new SourceLocation(element.getSourceLocation().getSourceFile(),element.getSourceLocation().getLine())); } } } } }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} } /** * 'typeToWeave' is one from the 'typesForWeaving' list. This routine ensures we process * supertypes (classes/interfaces) of 'typeToWeave' that are in the * 'typesForWeaving' list before 'typeToWeave' itself. 'typesToWeave' is then removed from * the 'typesForWeaving' list. * * Note: Future gotcha in here ... when supplying partial hierarchies, this algorithm may * break down. If you have a hierarchy A>B>C and only give A and C to the weaver, it * may choose to weave them in either order - but you'll probably have other problems if * you are supplying partial hierarchies like that ! */ private void weaveParentsFor(List typesForWeaving,String typeToWeave) { ResolvedType rtx = world.resolve(typeToWeave); ResolvedType superType = rtx.getSuperclass(); if (superType!=null && typesForWeaving.contains(superType.getName())) { weaveParentsFor(typesForWeaving,superType.getName()); } ResolvedType[] interfaceTypes = rtx.getDeclaredInterfaces(); for (int i = 0; i < interfaceTypes.length; i++) { ResolvedType rtxI = interfaceTypes[i]; if (typesForWeaving.contains(rtxI.getName())) { weaveParentsFor(typesForWeaving,rtxI.getName()); }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_DECLARE_PARENTS,rtx.getName()); weaveParentTypeMungers(rtx); CompilationAndWeavingContext.leavingPhase(tok); typesForWeaving.remove(typeToWeave); } public void prepareToProcessReweavableState() { } public void processReweavableStateIfPresent(String className, BcelObjectType classType) { WeaverStateInfo wsi = classType.getWeaverState(); if (wsi!=null && wsi.isReweavable()) { world.showMessage(IMessage.INFO, WeaverMessages.format(WeaverMessages.PROCESSING_REWEAVABLE,className,classType.getSourceLocation().getSourceFile()), null,null); Set aspectsPreviouslyInWorld = wsi.getAspectsAffectingType(); if (aspectsPreviouslyInWorld!=null) { Set alreadyConfirmedReweavableState = new HashSet(); for (Iterator iter = aspectsPreviouslyInWorld.iterator(); iter.hasNext();) { String requiredTypeName = (String) iter.next(); if (!alreadyConfirmedReweavableState.contains(requiredTypeName)) { ResolvedType rtx = world.resolve(UnresolvedType.forName(requiredTypeName),true); boolean exists = !rtx.isMissing(); if (!exists) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.MISSING_REWEAVABLE_TYPE,requiredTypeName,className), classType.getSourceLocation(), null);
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} else { if(!xcutSet.containsAspect(rtx)){ world.showMessage( IMessage.ERROR, WeaverMessages.format( WeaverMessages.REWEAVABLE_ASPECT_NOT_REGISTERED, requiredTypeName, className ), null, null ); } else if (!world.getMessageHandler().isIgnoring(IMessage.INFO)) world.showMessage(IMessage.INFO, WeaverMessages.format(WeaverMessages.VERIFIED_REWEAVABLE_TYPE,requiredTypeName,rtx.getSourceLocation().getSourceFile()), null,null); alreadyConfirmedReweavableState.add(requiredTypeName); } } } } old: classType.setJavaClass(Utility.makeJavaClass(classType.getJavaClass().getFileName(), wsi.getUnwovenClassFileData(classType.getJavaClass().getBytes()))); } }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
private void weaveAndNotify(UnwovenClassFile classFile, BcelObjectType classType, IWeaveRequestor requestor) throws IOException { trace.enter("weaveAndNotify",this,new Object[] {classFile,classType,requestor}); ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.WEAVING_TYPE, classType.getResolvedTypeX().getName()); LazyClassGen clazz = weaveWithoutDump(classFile,classType); classType.finishedWith(); if (clazz != null) { UnwovenClassFile[] newClasses = getClassFilesFor(clazz); for (int i = 0; i < newClasses.length; i++) { requestor.acceptResult(newClasses[i]); } } else { requestor.acceptResult(classFile); } classType.weavingCompleted(); CompilationAndWeavingContext.leavingPhase(tok); trace.exit("weaveAndNotify"); } public BcelObjectType getClassType(String forClass) { return BcelWorld.getBcelObjectType(world.resolve(forClass)); } public void addParentTypeMungers(String typeName) { weaveParentTypeMungers(world.resolve(typeName));
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} public void addNormalTypeMungers(String typeName) { weaveNormalTypeMungers(world.resolve(typeName)); } public UnwovenClassFile[] getClassFilesFor(LazyClassGen clazz) { List childClasses = clazz.getChildClasses(world); UnwovenClassFile[] ret = new UnwovenClassFile[1 + childClasses.size()]; ret[0] = new UnwovenClassFile(clazz.getFileName(),clazz.getJavaClassBytesIncludingReweavable(world)); int index = 1; for (Iterator iter = childClasses.iterator(); iter.hasNext();) { UnwovenClassFile.ChildClass element = (UnwovenClassFile.ChildClass) iter.next(); UnwovenClassFile childClass = new UnwovenClassFile(clazz.getFileName() + "$" + element.name, element.bytes); ret[index++] = childClass; } return ret; } /** * Weaves new parents and annotations onto a type ("declare parents" and "declare @type") * * Algorithm: * 1. First pass, do parents then do annotations. During this pass record: * - any parent mungers that don't match but have a non-wild annotation type pattern * - any annotation mungers that don't match * 2. Multiple subsequent passes which go over the munger lists constructed in the first * pass, repeatedly applying them until nothing changes. * FIXME asc confirm that algorithm is optimal ?? */ public void weaveParentTypeMungers(ResolvedType onType) {
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
if (onType.isRawType()) onType = onType.getGenericType(); onType.clearInterTypeMungers(); List decpToRepeat = new ArrayList(); boolean aParentChangeOccurred = false; boolean anAnnotationChangeOccurred = false; for (Iterator i = declareParentsList.iterator(); i.hasNext(); ) { DeclareParents decp = (DeclareParents)i.next(); boolean typeChanged = applyDeclareParents(decp,onType); if (typeChanged) { aParentChangeOccurred = true; } else { decpToRepeat.add(decp); } } for (Iterator i = xcutSet.getDeclareAnnotationOnTypes().iterator();i.hasNext();) { DeclareAnnotation decA = (DeclareAnnotation)i.next(); boolean typeChanged = applyDeclareAtType(decA,onType,true); if (typeChanged) { anAnnotationChangeOccurred = true; } } while ((aParentChangeOccurred || anAnnotationChangeOccurred) && !decpToRepeat.isEmpty()) { anAnnotationChangeOccurred = aParentChangeOccurred = false; List decpToRepeatNextTime = new ArrayList(); for (Iterator iter = decpToRepeat.iterator(); iter.hasNext();) { DeclareParents decp = (DeclareParents) iter.next();
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
boolean typeChanged = applyDeclareParents(decp,onType); if (typeChanged) { aParentChangeOccurred = true; } else { decpToRepeatNextTime.add(decp); } } for (Iterator iter = xcutSet.getDeclareAnnotationOnTypes().iterator(); iter.hasNext();) { DeclareAnnotation decA = (DeclareAnnotation) iter.next(); boolean typeChanged = applyDeclareAtType(decA,onType,false); if (typeChanged) { anAnnotationChangeOccurred = true; } } decpToRepeat = decpToRepeatNextTime; } } /** * Apply a declare @type - return true if we change the type */ private boolean applyDeclareAtType(DeclareAnnotation decA, ResolvedType onType,boolean reportProblems) { boolean didSomething = false; if (decA.matches(onType)) { if (onType.hasAnnotation(decA.getAnnotationX().getSignature())) { return false; }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
AnnotationX annoX = decA.getAnnotationX(); boolean problemReported = verifyTargetIsOK(decA, onType, annoX,reportProblems); if (!problemReported) { AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decA.getSourceLocation(),onType.getSourceLocation()); if (!getWorld().getMessageHandler().isIgnoring(IMessage.WEAVEINFO)){ getWorld().getMessageHandler().handleMessage( WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ANNOTATES, new String[]{ onType.toString(), Utility.beautifyLocation(onType.getSourceLocation()), decA.getAnnotationString(), "type", decA.getAspect().toString(), Utility.beautifyLocation(decA.getSourceLocation()) })); } didSomething = true; ResolvedTypeMunger newAnnotationTM = new AnnotationOnTypeMunger(annoX); newAnnotationTM.setSourceLocation(decA.getSourceLocation()); onType.addInterTypeMunger(new BcelTypeMunger(newAnnotationTM,decA.getAspect().resolve(world))); decA.copyAnnotationTo(onType); } } return didSomething; } /**
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
* Checks for an @target() on the annotation and if found ensures it allows the annotation * to be attached to the target type that matched. */ private boolean verifyTargetIsOK(DeclareAnnotation decA, ResolvedType onType, AnnotationX annoX,boolean outputProblems) { boolean problemReported = false; if (annoX.specifiesTarget()) { if ( (onType.isAnnotation() && !annoX.allowedOnAnnotationType()) || (!annoX.allowedOnRegularType())) { if (outputProblems) { if (decA.isExactPattern()) { world.getMessageHandler().handleMessage(MessageUtil.error( WeaverMessages.format(WeaverMessages.INCORRECT_TARGET_FOR_DECLARE_ANNOTATION, onType.getName(),annoX.stringify(),annoX.getValidTargets()),decA.getSourceLocation())); } else { if (world.getLint().invalidTargetForAnnotation.isEnabled()) { world.getLint().invalidTargetForAnnotation.signal( new String[]{onType.getName(),annoX.stringify(),annoX.getValidTargets()},decA.getSourceLocation(),new ISourceLocation[]{onType.getSourceLocation()}); } } } problemReported = true; } } return problemReported; } /** * Apply a single declare parents - return true if we change the type */ private boolean applyDeclareParents(DeclareParents p, ResolvedType onType) {
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
boolean didSomething = false; List newParents = p.findMatchingNewParents(onType,true); if (!newParents.isEmpty()) { didSomething=true; BcelObjectType classType = BcelWorld.getBcelObjectType(onType); for (Iterator j = newParents.iterator(); j.hasNext(); ) { ResolvedType newParent = (ResolvedType)j.next(); classType.addParent(newParent); ResolvedTypeMunger newParentMunger = new NewParentTypeMunger(newParent); newParentMunger.setSourceLocation(p.getSourceLocation()); onType.addInterTypeMunger(new BcelTypeMunger(newParentMunger, xcutSet.findAspectDeclaringParents(p))); } } return didSomething; } public void weaveNormalTypeMungers(ResolvedType onType) { ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_TYPE_MUNGERS, onType.getName()); if (onType.isRawType() || onType.isParameterizedType()) onType = onType.getGenericType(); for (Iterator i = typeMungerList.iterator(); i.hasNext(); ) { ConcreteTypeMunger m = (ConcreteTypeMunger)i.next(); if (!m.isLateMunger() && m.matches(onType)) { onType.addInterTypeMunger(m); } }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
CompilationAndWeavingContext.leavingPhase(tok); } public LazyClassGen weaveWithoutDump(UnwovenClassFile classFile, BcelObjectType classType) throws IOException { return weave(classFile, classType, false); } LazyClassGen weave(UnwovenClassFile classFile, BcelObjectType classType) throws IOException { LazyClassGen ret = weave(classFile, classType, true); if (progressListener != null) { progressMade += progressPerClassFile; progressListener.setProgress(progressMade); progressListener.setText("woven: " + classFile.getFilename()); } return ret; } private LazyClassGen weave(UnwovenClassFile classFile, BcelObjectType classType, boolean dump) throws IOException { if (classType.isSynthetic()) { if (dump) dumpUnchanged(classFile); return null; } List shadowMungers = fastMatch(shadowMungerList, classType.getResolvedTypeX()); List typeMungers = classType.getResolvedTypeX().getInterTypeMungers(); classType.getResolvedTypeX().checkInterTypeMungers(); boolean mightNeedToWeave =
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
shadowMungers.size() > 0 || typeMungers.size() > 0 || classType.isAspect() || world.getDeclareAnnotationOnMethods().size()>0 || world.getDeclareAnnotationOnFields().size()>0; boolean mightNeedBridgeMethods = world.isInJava5Mode() && !classType.isInterface() && classType.getResolvedTypeX().getInterTypeMungersIncludingSupers().size()>0; LazyClassGen clazz = null; if (mightNeedToWeave || mightNeedBridgeMethods) { clazz = classType.getLazyClassGen(); try { boolean isChanged = false; if (mightNeedToWeave) isChanged = BcelClassWeaver.weave(world, clazz, shadowMungers, typeMungers, lateTypeMungerList); if (mightNeedBridgeMethods) isChanged = BcelClassWeaver.calculateAnyRequiredBridgeMethods(world,clazz) || isChanged; if (isChanged) { if (dump) dump(classFile, clazz); return clazz; } } catch (RuntimeException re) { String classDebugInfo = null; try { classDebugInfo = clazz.toLongString();
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} catch (Exception e) { classDebugInfo = clazz.getClassName(); } String messageText = "trouble in: \n" + classDebugInfo; getWorld().getMessageHandler().handleMessage( new Message(messageText,IMessage.ABORT,re,null) ); } catch (Error re) { String classDebugInfo = null; try { classDebugInfo = clazz.toLongString(); } catch (Exception e) { classDebugInfo = clazz.getClassName(); } String messageText = "trouble in: \n" + classDebugInfo; getWorld().getMessageHandler().handleMessage( new Message(messageText,IMessage.ABORT,re,null) ); } } if (dump) { dumpUnchanged(classFile); return clazz; } else {
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
if (clazz != null && !clazz.getChildClasses(world).isEmpty()) { return clazz; } return null; } } private void dumpUnchanged(UnwovenClassFile classFile) throws IOException { if (zipOutputStream != null) { writeZipEntry(getEntryName(classFile.getJavaClass().getClassName()), classFile.getBytes()); } else { classFile.writeUnchangedBytes(); } } private String getEntryName(String className) { return className.replace('.', '/') + ".class"; } private void dump(UnwovenClassFile classFile, LazyClassGen clazz) throws IOException { if (zipOutputStream != null) { String mainClassName = classFile.getJavaClass().getClassName(); writeZipEntry(getEntryName(mainClassName), clazz.getJavaClass(world).getBytes()); if (!clazz.getChildClasses(world).isEmpty()) { for (Iterator i = clazz.getChildClasses(world).iterator(); i.hasNext();) { UnwovenClassFile.ChildClass c = (UnwovenClassFile.ChildClass) i.next(); writeZipEntry(getEntryName(mainClassName + "$" + c.name), c.bytes); } }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
} else { classFile.writeWovenBytes( clazz.getJavaClass(world).getBytes(), clazz.getChildClasses(world) ); } } private void writeZipEntry(String name, byte[] bytes) throws IOException { ZipEntry newEntry = new ZipEntry(name); zipOutputStream.putNextEntry(newEntry); zipOutputStream.write(bytes); zipOutputStream.closeEntry(); } private List fastMatch(List list, ResolvedType type) { if (list == null) return Collections.EMPTY_LIST; FastMatchInfo info = new FastMatchInfo(type, null); List result = new ArrayList(); Iterator iter = list.iterator(); while (iter.hasNext()) { ShadowMunger munger = (ShadowMunger)iter.next(); FuzzyBoolean fb = munger.getPointcut().fastMatch(info); WeaverMetrics.recordFastMatchTypeResult(fb); if (fb.maybeTrue()) { result.add(munger); } }
193,348
Bug 193348 NPE on attempt to compile
I can't really pinpoint any code that trigger this. It happens on for an incremental, and only some of the time. If I do a full build of the project then I do not get the error and all seems to work. ---- java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.raiseUnboundFormalError(BcelWeaver.java:833) at org.aspectj.weaver.bcel.BcelWeaver.validateSingleBranch(BcelWeaver.java:688) at org.aspectj.weaver.bcel.BcelWeaver.validateBindings(BcelWeaver.java:627) at org.aspectj.weaver.bcel.BcelWeaver.rewritePointcuts(BcelWeaver.java:556) at org.aspectj.weaver.bcel.BcelWeaver.prepareForWeave(BcelWeaver.java:484) at org.aspectj.ajd ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
resolved fixed
a31b3de
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-10T18:09:16Z
2007-06-19T16:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
return result; } public void setProgressListener(IProgressListener listener, double previousProgress, double progressPerClassFile) { progressListener = listener; this.progressMade = previousProgress; this.progressPerClassFile = progressPerClassFile; } public void setReweavableMode(boolean xNotReweavable) { if (trace.isTraceEnabled()) trace.enter("setReweavableMode",this,xNotReweavable); inReweavableMode = !xNotReweavable; WeaverStateInfo.setReweavableModeDefaults(!xNotReweavable,false,true); BcelClassWeaver.setReweavableMode(!xNotReweavable); if (trace.isTraceEnabled()) trace.exit("setReweavableMode"); } public boolean isReweavable() { return inReweavableMode; } public World getWorld() { return world; } public void tidyUp() { if (trace.isTraceEnabled()) trace.enter("tidyUp",this); shadowMungerList = null; typeMungerList = null; lateTypeMungerList = null; declareParentsList = null; if (trace.isTraceEnabled()) trace.exit("tidyUp"); } }
222,437
Bug 222437 MANIFEST.MF copying is not always reliable
Sometimes an AJDT project gets into a state where it has a meta-inf/manifest.mf - and this file fails to make it out to the destination folder.
resolved fixed
906c849
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-12T17:51:13Z
2008-03-12T16:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
/* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http:www.eclipse.org/legal/epl-v10.html * * Contributors: * PARC initial implementation * ******************************************************************/ package org.aspectj.ajdt.internal.core.builder; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileFilter; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.jar.Attributes;
222,437
Bug 222437 MANIFEST.MF copying is not always reliable
Sometimes an AJDT project gets into a state where it has a meta-inf/manifest.mf - and this file fails to make it out to the destination folder.
resolved fixed
906c849
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-12T17:51:13Z
2008-03-12T16:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
import java.util.jar.JarFile; import java.util.jar.JarInputStream; import java.util.jar.JarOutputStream; import java.util.jar.Manifest; import java.util.zip.ZipEntry; import org.aspectj.ajdt.internal.compiler.AjCompilerAdapter; import org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter; import org.aspectj.ajdt.internal.compiler.IBinarySourceProvider; import org.aspectj.ajdt.internal.compiler.ICompilerAdapter; import org.aspectj.ajdt.internal.compiler.ICompilerAdapterFactory; import org.aspectj.ajdt.internal.compiler.IIntermediateResultsRequestor; import org.aspectj.ajdt.internal.compiler.IOutputClassFileNameProvider; import org.aspectj.ajdt.internal.compiler.InterimCompilationResult; import org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment; import org.aspectj.ajdt.internal.compiler.lookup.AnonymousClassPublisher; import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory; import org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter; import org.aspectj.asm.AsmManager; import org.aspectj.asm.IHierarchy; import org.aspectj.asm.IProgramElement; import org.aspectj.asm.internal.ProgramElement; import org.aspectj.bridge.AbortException; import org.aspectj.bridge.CountingMessageHandler; import org.aspectj.bridge.ILifecycleAware; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.IMessageHandler; import org.aspectj.bridge.IProgressListener; import org.aspectj.bridge.Message; import org.aspectj.bridge.MessageUtil; import org.aspectj.bridge.SourceLocation;
222,437
Bug 222437 MANIFEST.MF copying is not always reliable
Sometimes an AJDT project gets into a state where it has a meta-inf/manifest.mf - and this file fails to make it out to the destination folder.
resolved fixed
906c849
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-12T17:51:13Z
2008-03-12T16:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
import org.aspectj.bridge.Version; import org.aspectj.bridge.context.CompilationAndWeavingContext; import org.aspectj.bridge.context.ContextFormatter; import org.aspectj.bridge.context.ContextToken; import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation; import org.aspectj.org.eclipse.jdt.core.compiler.IProblem; import org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile; import org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult; import org.aspectj.org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies; import org.aspectj.org.eclipse.jdt.internal.compiler.ICompilerRequestor; import org.aspectj.org.eclipse.jdt.internal.compiler.IProblemFactory; import org.aspectj.org.eclipse.jdt.internal.compiler.batch.ClasspathLocation; import org.aspectj.org.eclipse.jdt.internal.compiler.batch.CompilationUnit; import org.aspectj.org.eclipse.jdt.internal.compiler.batch.FileSystem; import org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit; import org.aspectj.org.eclipse.jdt.internal.compiler.env.INameEnvironment; import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions; import org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser; import org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation; import org.aspectj.org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory; import org.aspectj.tools.ajc.Main; import org.aspectj.util.FileUtil; import org.aspectj.weaver.CustomMungerFactory; import org.aspectj.weaver.Dump; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.World; import org.aspectj.weaver.bcel.BcelWeaver; import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.UnwovenClassFile; import org.eclipse.core.runtime.OperationCanceledException;
222,437
Bug 222437 MANIFEST.MF copying is not always reliable
Sometimes an AJDT project gets into a state where it has a meta-inf/manifest.mf - and this file fails to make it out to the destination folder.
resolved fixed
906c849
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-12T17:51:13Z
2008-03-12T16:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourceProvider,ICompilerAdapterFactory { private static final String CROSSREFS_FILE_NAME = "build.lst"; private static final String CANT_WRITE_RESULT = "unable to write compilation result"; private static final String MANIFEST_NAME = "META-INF/MANIFEST.MF"; public static boolean COPY_INPATH_DIR_RESOURCES = false; private static boolean DO_RUNTIME_VERSION_CHECK = false; static final boolean FAIL_IF_RUNTIME_NOT_FOUND = false; private static final FileFilter binarySourceFilter = new FileFilter() { public boolean accept(File f) { return f.getName().endsWith(".class"); }}; /** * This builder is static so that it can be subclassed and reset. However, note * that there is only one builder present, so if two extendsion reset it, only * the latter will get used. */ public static AsmHierarchyBuilder asmHierarchyBuilder = new AsmHierarchyBuilder(); static { CompilationAndWeavingContext.setMultiThreaded(false); CompilationAndWeavingContext.registerFormatter( CompilationAndWeavingContext.BATCH_BUILD, new AjBuildContexFormatter()); CompilationAndWeavingContext.registerFormatter( CompilationAndWeavingContext.INCREMENTAL_BUILD, new AjBuildContexFormatter()); }
222,437
Bug 222437 MANIFEST.MF copying is not always reliable
Sometimes an AJDT project gets into a state where it has a meta-inf/manifest.mf - and this file fails to make it out to the destination folder.
resolved fixed
906c849
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-12T17:51:13Z
2008-03-12T16:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
private IProgressListener progressListener = null; private boolean environmentSupportsIncrementalCompilation = false; private int compiledCount; private int sourceFileCount; private JarOutputStream zos; private boolean batchCompile = true; private INameEnvironment environment; private Map binarySourcesForTheNextCompile = new HashMap(); private IHierarchy structureModel; public AjBuildConfig buildConfig; private boolean ignoreOutxml; private boolean wasFullBuild = true; AjState state = new AjState(this); /** * Enable check for runtime version, used only by Ant/command-line Main. * @param main Main unused except to limit to non-null clients. */ public static void enableRuntimeVersionCheck(Main caller) { DO_RUNTIME_VERSION_CHECK = null != caller; } public BcelWeaver getWeaver() { return state.getWeaver();}
222,437
Bug 222437 MANIFEST.MF copying is not always reliable
Sometimes an AJDT project gets into a state where it has a meta-inf/manifest.mf - and this file fails to make it out to the destination folder.
resolved fixed
906c849
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-12T17:51:13Z
2008-03-12T16:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
public BcelWorld getBcelWorld() { return state.getBcelWorld();} public CountingMessageHandler handler; private CustomMungerFactory customMungerFactory; public AjBuildManager(IMessageHandler holder) { super(); this.handler = CountingMessageHandler.makeCountingMessageHandler(holder); } public void environmentSupportsIncrementalCompilation(boolean itDoes) { this.environmentSupportsIncrementalCompilation = itDoes; } public boolean doGenerateModel() { return buildConfig.isGenerateModelMode(); } public boolean batchBuild( AjBuildConfig buildConfig, IMessageHandler baseHandler) throws IOException, AbortException { return doBuild(buildConfig, baseHandler, true); } public boolean incrementalBuild( AjBuildConfig buildConfig, IMessageHandler baseHandler) throws IOException, AbortException { return doBuild(buildConfig, baseHandler, false); }
222,437
Bug 222437 MANIFEST.MF copying is not always reliable
Sometimes an AJDT project gets into a state where it has a meta-inf/manifest.mf - and this file fails to make it out to the destination folder.
resolved fixed
906c849
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-12T17:51:13Z
2008-03-12T16:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
protected boolean doBuild( AjBuildConfig buildConfig, IMessageHandler baseHandler, boolean batch) throws IOException, AbortException { boolean ret = true; batchCompile = batch; wasFullBuild = batch; if (baseHandler instanceof ILifecycleAware) { ((ILifecycleAware)baseHandler).buildStarting(!batch); } CompilationAndWeavingContext.reset(); int phase = batch ? CompilationAndWeavingContext.BATCH_BUILD : CompilationAndWeavingContext.INCREMENTAL_BUILD; ContextToken ct = CompilationAndWeavingContext.enteringPhase(phase ,buildConfig); try { if (batch) { this.state = new AjState(this); } this.state.setCouldBeSubsequentIncrementalBuild(this.environmentSupportsIncrementalCompilation); boolean canIncremental = state.prepareForNextBuild(buildConfig); if (!canIncremental && !batch) { CompilationAndWeavingContext.leavingPhase(ct); if (state.listenerDefined()) state.getListener().recordDecision("Falling back to batch compilation"); return doBuild(buildConfig, baseHandler, true); } this.handler = CountingMessageHandler.makeCountingMessageHandler(baseHandler); if (DO_RUNTIME_VERSION_CHECK) { String check = checkRtJar(buildConfig);
222,437
Bug 222437 MANIFEST.MF copying is not always reliable
Sometimes an AJDT project gets into a state where it has a meta-inf/manifest.mf - and this file fails to make it out to the destination folder.
resolved fixed
906c849
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-12T17:51:13Z
2008-03-12T16:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
if (check != null) { if (FAIL_IF_RUNTIME_NOT_FOUND) { MessageUtil.error(handler, check); CompilationAndWeavingContext.leavingPhase(ct); return false; } else { MessageUtil.warn(handler, check); } } } setBuildConfig(buildConfig); } if (batch || !AsmManager.attemptIncrementalModelRepairs) { setupModel(buildConfig); } if (batch) { initBcelWorld(handler); } if (handler.hasErrors()) { CompilationAndWeavingContext.leavingPhase(ct); return false; } if (buildConfig.getOutputJar() != null) { if (!openOutputStream(buildConfig.getOutputJar())) { CompilationAndWeavingContext.leavingPhase(ct); return false; }
222,437
Bug 222437 MANIFEST.MF copying is not always reliable
Sometimes an AJDT project gets into a state where it has a meta-inf/manifest.mf - and this file fails to make it out to the destination folder.
resolved fixed
906c849
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-12T17:51:13Z
2008-03-12T16:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
} if (batch) { if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) { getWorld().setModel(AsmManager.getDefault().getHierarchy()); } binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(true); performCompilation(buildConfig.getFiles()); state.clearBinarySourceFiles(); if (handler.hasErrors()) { CompilationAndWeavingContext.leavingPhase(ct); if (AsmManager.isReporting()) AsmManager.getDefault().reportModelInfo("After a failed batch build"); return false; } if (AsmManager.isReporting()) AsmManager.getDefault().reportModelInfo("After a batch build"); } else { binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(true); List files = state.getFilesToCompile(true); if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) if (AsmManager.attemptIncrementalModelRepairs) AsmManager.getDefault().processDelta(files,state.getAddedFiles(),state.getDeletedFiles()); boolean hereWeGoAgain = !(files.isEmpty() && binarySourcesForTheNextCompile.isEmpty()); for (int i = 0; (i < 5) && hereWeGoAgain; i++) {
222,437
Bug 222437 MANIFEST.MF copying is not always reliable
Sometimes an AJDT project gets into a state where it has a meta-inf/manifest.mf - and this file fails to make it out to the destination folder.
resolved fixed
906c849
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-12T17:51:13Z
2008-03-12T16:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
if (state.listenerDefined()) state.getListener().recordInformation("Starting incremental compilation loop "+(i+1)+" of possibly 5"); performCompilation(files); if (handler.hasErrors() || (progressListener!=null && progressListener.isCancelledRequested())) { CompilationAndWeavingContext.leavingPhase(ct); return false; } if (state.requiresFullBatchBuild()) { if (state.listenerDefined()) state.getListener().recordInformation(" Dropping back to full build"); return batchBuild(buildConfig, baseHandler); } binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(false); files = state.getFilesToCompile(false); hereWeGoAgain = !(files.isEmpty() && binarySourcesForTheNextCompile.isEmpty()); if (hereWeGoAgain) { if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) if (AsmManager.attemptIncrementalModelRepairs) AsmManager.getDefault().processDelta(files,state.getAddedFiles(),state.getDeletedFiles()); } }
222,437
Bug 222437 MANIFEST.MF copying is not always reliable
Sometimes an AJDT project gets into a state where it has a meta-inf/manifest.mf - and this file fails to make it out to the destination folder.
resolved fixed
906c849
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-03-12T17:51:13Z
2008-03-12T16:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
if (!files.isEmpty()) { CompilationAndWeavingContext.leavingPhase(ct); return batchBuild(buildConfig, baseHandler); } else { if (AsmManager.isReporting()) AsmManager.getDefault().reportModelInfo("After an incremental build"); } } if (buildConfig.isEmacsSymMode()) { new org.aspectj.ajdt.internal.core.builder.EmacsStructureModelManager().externalizeModel(); } if (buildConfig.isGenerateCrossRefsMode()) { File configFileProxy = new File(buildConfig.getOutputDir(),CROSSREFS_FILE_NAME); AsmManager.getDefault().writeStructureModel(configFileProxy.getAbsolutePath()); } state.successfulCompile(buildConfig,batch); copyResourcesToDestination(); if (buildConfig.getOutxmlName() != null) { writeOutxmlFile(); }