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
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
bitflags |= 0x000010; if (bindsTarget(munger)) bitflags |= 0x000001; if (munger.getConcreteAspect() != null && munger.getConcreteAspect().isAnnotationStyleAspect() && munger.getDeclaringAspect() != null && munger.getDeclaringAspect().resolve(world).isAnnotationStyleAspect()) { closureInstantiation.append(fact.createConstant(Integer.valueOf(bitflags))); closureInstantiation.append(Utility.createInvoke(getFactory(), getWorld(), new MemberImpl(Member.METHOD, UnresolvedType .forName("org.aspectj.runtime.internal.AroundClosure"), Modifier.PUBLIC, "linkClosureAndJoinPoint", "(I)Lorg/aspectj/lang/ProceedingJoinPoint;"))); } InstructionList advice = new InstructionList(); advice.append(munger.getAdviceArgSetup(this, null, closureInstantiation)); advice.append(munger.getNonTestAdviceInstructions(this)); advice.append(returnConversionCode); if (getKind() == Shadow.MethodExecution && linenumber > 0) { advice.getStart().addTargeter(new LineNumberTag(linenumber)); } if (!hasDynamicTest) { range.append(advice); } else { InstructionList callback = makeCallToCallback(callbackMethod); InstructionList postCallback = new InstructionList(); if (terminatesWithReturn()) { callback.append(InstructionFactory.createReturn(callbackMethod.getReturnType())); } else { advice.append(InstructionFactory.createBranchInstruction(Constants.GOTO, postCallback .append(InstructionConstants.NOP)));
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
} range.append(munger.getTestInstructions(this, advice.getStart(), callback.getStart(), advice.getStart())); range.append(advice); range.append(callback); range.append(postCallback); } } InstructionList makeCallToCallback(LazyMethodGen callbackMethod) { InstructionFactory fact = getFactory(); InstructionList callback = new InstructionList(); if (thisVar != null) { callback.append(InstructionConstants.ALOAD_0); } if (targetVar != null && targetVar != thisVar) { callback.append(BcelRenderer.renderExpr(fact, world, targetVar)); } callback.append(BcelRenderer.renderExprs(fact, world, argVars)); if (thisJoinPointVar != null) { callback.append(BcelRenderer.renderExpr(fact, world, thisJoinPointVar)); } callback.append(Utility.createInvoke(fact, callbackMethod)); return callback; } private InstructionList makeClosureInstantiation(Member constructor, BcelVar holder) { InstructionFactory fact = getFactory(); BcelVar arrayVar = genTempVar(UnresolvedType.OBJECTARRAY);
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
final InstructionList il = new InstructionList(); int alen = getArgCount() + (thisVar == null ? 0 : 1) + ((targetVar != null && targetVar != thisVar) ? 1 : 0) + (thisJoinPointVar == null ? 0 : 1); il.append(Utility.createConstant(fact, alen)); il.append(fact.createNewArray(Type.OBJECT, (short) 1)); arrayVar.appendStore(il, fact); int stateIndex = 0; if (thisVar != null) { arrayVar.appendConvertableArrayStore(il, fact, stateIndex, thisVar); thisVar.setPositionInAroundState(stateIndex); stateIndex++; } if (targetVar != null && targetVar != thisVar) { arrayVar.appendConvertableArrayStore(il, fact, stateIndex, targetVar); targetVar.setPositionInAroundState(stateIndex); stateIndex++; } for (int i = 0, len = getArgCount(); i < len; i++) { arrayVar.appendConvertableArrayStore(il, fact, stateIndex, argVars[i]); argVars[i].setPositionInAroundState(stateIndex); stateIndex++; } if (thisJoinPointVar != null) { arrayVar.appendConvertableArrayStore(il, fact, stateIndex, thisJoinPointVar); thisJoinPointVar.setPositionInAroundState(stateIndex); stateIndex++; } il.append(fact.createNew(new ObjectType(constructor.getDeclaringType().getName()))); il.append(InstructionConstants.DUP);
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
arrayVar.appendLoad(il, fact); il.append(Utility.createInvoke(fact, world, constructor)); if (getKind() == PreInitialization) { il.append(InstructionConstants.DUP); holder.appendStore(il, fact); } return il; } private IntMap makeProceedArgumentMap(BcelVar[] adviceArgs) { IntMap ret = new IntMap(); for (int i = 0, len = adviceArgs.length; i < len; i++) { BcelVar v = adviceArgs[i]; if (v == null) continue; int pos = v.getPositionInAroundState(); if (pos >= 0) { ret.put(pos, i); } } return ret; } /** * * * @param callbackMethod the method we will call back to when our run method gets called. * * @param proceedMap A map from state position to proceed argument position. May be non covering on state position. */
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
private LazyMethodGen makeClosureClassAndReturnConstructor(String closureClassName, LazyMethodGen callbackMethod, IntMap proceedMap) { String superClassName = "org.aspectj.runtime.internal.AroundClosure"; Type objectArrayType = new ArrayType(Type.OBJECT, 1); LazyClassGen closureClass = new LazyClassGen(closureClassName, superClassName, getEnclosingClass().getFileName(), Modifier.PUBLIC, new String[] {}, getWorld()); InstructionFactory fact = new InstructionFactory(closureClass.getConstantPool()); LazyMethodGen constructor = new LazyMethodGen(Modifier.PUBLIC, Type.VOID, "<init>", new Type[] { objectArrayType }, new String[] {}, closureClass); InstructionList cbody = constructor.getBody(); cbody.append(InstructionFactory.createLoad(Type.OBJECT, 0)); cbody.append(InstructionFactory.createLoad(objectArrayType, 1)); cbody.append(fact .createInvoke(superClassName, "<init>", Type.VOID, new Type[] { objectArrayType }, Constants.INVOKESPECIAL)); cbody.append(InstructionFactory.createReturn(Type.VOID)); closureClass.addMethodGen(constructor); method LazyMethodGen runMethod = new LazyMethodGen(Modifier.PUBLIC, Type.OBJECT, "run", new Type[] { objectArrayType }, new String[] {}, closureClass); InstructionList mbody = runMethod.getBody(); BcelVar proceedVar = new BcelVar(UnresolvedType.OBJECTARRAY.resolve(world), 1); BcelVar stateVar = new BcelVar(UnresolvedType.OBJECTARRAY.resolve(world), runMethod.allocateLocal(1)); mbody.append(InstructionFactory.createThis()); mbody.append(fact.createGetField(superClassName, "state", objectArrayType)); mbody.append(stateVar.createStore(fact)); Type[] stateTypes = callbackMethod.getArgumentTypes();
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
for (int i = 0, len = stateTypes.length; i < len; i++) { Type stateType = stateTypes[i]; ResolvedType stateTypeX = BcelWorld.fromBcel(stateType).resolve(world); if (proceedMap.hasKey(i)) { mbody.append(proceedVar.createConvertableArrayLoad(fact, proceedMap.get(i), stateTypeX)); } else { mbody.append(stateVar.createConvertableArrayLoad(fact, i, stateTypeX)); } } mbody.append(Utility.createInvoke(fact, callbackMethod)); if (getKind() == PreInitialization) { mbody.append(Utility.createSet(fact, AjcMemberMaker.aroundClosurePreInitializationField())); mbody.append(InstructionConstants.ACONST_NULL); } else { mbody.append(Utility.createConversion(fact, callbackMethod.getReturnType(), Type.OBJECT)); } mbody.append(InstructionFactory.createReturn(Type.OBJECT)); closureClass.addMethodGen(runMethod); class getEnclosingClass().addGeneratedInner(closureClass); return constructor; } public LazyMethodGen extractMethod(String newMethodName, int visibilityModifier, ShadowMunger munger) { LazyMethodGen.assertGoodBody(range.getBody(), newMethodName); if (!getKind().allowsExtraction()) throw new BCException("Attempt to extract method from a shadow kind that does not support this operation (" + getKind() + ")"); LazyMethodGen freshMethod = createMethodGen(newMethodName, visibilityModifier);
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
range.extractInstructionsInto(freshMethod, makeRemap(), (getKind() != PreInitialization) && isFallsThrough()); if (getKind() == PreInitialization) { addPreInitializationReturnCode(freshMethod, getSuperConstructorParameterTypes()); } getEnclosingClass().addMethodGen(freshMethod, munger.getSourceLocation()); return freshMethod; } private void addPreInitializationReturnCode(LazyMethodGen extractedMethod, Type[] superConstructorTypes) { InstructionList body = extractedMethod.getBody(); final InstructionFactory fact = getFactory(); BcelVar arrayVar = new BcelVar(world.getCoreType(UnresolvedType.OBJECTARRAY), extractedMethod.allocateLocal(1)); int len = superConstructorTypes.length; body.append(Utility.createConstant(fact, len)); body.append(fact.createNewArray(Type.OBJECT, (short) 1)); arrayVar.appendStore(body, fact); for (int i = len - 1; i >= 0; i++) { body.append(Utility.createConversion(fact, superConstructorTypes[i], Type.OBJECT)); arrayVar.appendLoad(body, fact); swap body.append(InstructionConstants.SWAP); body.append(Utility.createConstant(fact, i));
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
body.append(InstructionConstants.SWAP); body.append(InstructionFactory.createArrayStore(Type.OBJECT)); } arrayVar.appendLoad(body, fact); body.append(InstructionConstants.ARETURN); } private Type[] getSuperConstructorParameterTypes() { InstructionHandle superCallHandle = getRange().getEnd().getNext(); InvokeInstruction superCallInstruction = (InvokeInstruction) superCallHandle.getInstruction(); return superCallInstruction.getArgumentTypes(getEnclosingClass().getConstantPool()); } /** * make a map from old frame location to new frame location. Any unkeyed frame location picks out a copied local */ private IntMap makeRemap() { IntMap ret = new IntMap(5); int reti = 0; if (thisVar != null) { ret.put(0, reti++); } if (targetVar != null && targetVar != thisVar) { ret.put(targetVar.getSlot(), reti++); } for (int i = 0, len = argVars.length; i < len; i++) { ret.put(argVars[i].getSlot(), reti); reti += argVars[i].getType().getSize(); } if (thisJoinPointVar != null) { ret.put(thisJoinPointVar.getSlot(), reti++);
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
} point. if (!getKind().argsOnStack()) { int oldi = 0; int newi = 0; if (arg0HoldsThis()) { ret.put(0, 0); oldi++; newi += 1; } for (int i = 0; i < getArgCount(); i++) { UnresolvedType type = getArgType(i); ret.put(oldi, newi); oldi += type.getSize(); newi += type.getSize(); } } return ret; } /** * The new method always static. It may take some extra arguments: this, target. If it's argsOnStack, then it must take both
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
* this/target If it's argsOnFrame, it shares this and target. ??? rewrite this to do less array munging, please */ private LazyMethodGen createMethodGen(String newMethodName, int visibilityModifier) { Type[] parameterTypes = BcelWorld.makeBcelTypes(getArgTypes()); int modifiers = Modifier.FINAL | visibilityModifier; } modifiers |= Modifier.STATIC; if (targetVar != null && targetVar != thisVar) { UnresolvedType targetType = getTargetType(); targetType = ensureTargetTypeIsCorrect(targetType); if ((getKind() == FieldGet || getKind() == FieldSet) && getActualTargetType() != null && !getActualTargetType().equals(targetType.getName())) { targetType = UnresolvedType.forName(getActualTargetType()).resolve(world); } ResolvedMember resolvedMember = getSignature().resolve(world); if (resolvedMember != null && Modifier.isProtected(resolvedMember.getModifiers()) && !samePackage(resolvedMember.getDeclaringType().getPackageName(), getEnclosingType().getPackageName()) && !resolvedMember.getName().equals("clone")) { if (!hasThis()) { if (Modifier.isStatic(enclosingMethod.getAccessFlags()) && enclosingMethod.getName().startsWith("access$")) { targetType = BcelWorld.fromBcel(enclosingMethod.getArgumentTypes()[0]);
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
} } else { if (!targetType.resolve(world).isAssignableFrom(getThisType().resolve(world))) { throw new BCException("bad bytecode"); } targetType = getThisType(); } } parameterTypes = addType(BcelWorld.makeBcelType(targetType), parameterTypes); } if (thisVar != null) { UnresolvedType thisType = getThisType(); parameterTypes = addType(BcelWorld.makeBcelType(thisType), parameterTypes); } if (thisJoinPointVar != null) { parameterTypes = addTypeToEnd(LazyClassGen.tjpType, parameterTypes); } UnresolvedType returnType; if (getKind() == PreInitialization) { returnType = UnresolvedType.OBJECTARRAY; } else { if (getKind() == ConstructorCall) returnType = getSignature().getDeclaringType(); else if (getKind() == FieldSet) returnType = ResolvedType.VOID;
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
else returnType = getSignature().getReturnType().resolve(world); } return new LazyMethodGen(modifiers, BcelWorld.makeBcelType(returnType), newMethodName, parameterTypes, new String[0], getEnclosingClass()); } private boolean samePackage(String p1, String p2) { if (p1 == null) return p2 == null; if (p2 == null) return false; return p1.equals(p2); } private Type[] addType(Type type, Type[] types) { int len = types.length; Type[] ret = new Type[len + 1]; ret[0] = type; System.arraycopy(types, 0, ret, 1, len); return ret; } private Type[] addTypeToEnd(Type type, Type[] types) { int len = types.length; Type[] ret = new Type[len + 1]; ret[len] = type; System.arraycopy(types, 0, ret, 0, len); return ret; }
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
public BcelVar genTempVar(UnresolvedType typeX) { return new BcelVar(typeX.resolve(world), genTempVarIndex(typeX.getSize())); } public BcelVar genTempVar(UnresolvedType typeX, String localName) { BcelVar tv = genTempVar(typeX); } } return tv; } private int genTempVarIndex(int size) { return enclosingMethod.allocateLocal(size); } public InstructionFactory getFactory() { return getEnclosingClass().getFactory(); } public ISourceLocation getSourceLocation() { int sourceLine = getSourceLine(); if (sourceLine == 0 || sourceLine == -1) { return getEnclosingClass().getType().getSourceLocation(); } else { if (getKind() == Shadow.StaticInitialization && getEnclosingClass().getType().getSourceLocation().getOffset() != 0) {
246,021
Bug 246021 FindBugs reporting another optimization
Ben Hale reported that FindBugs was producing a warning about a dead store to a local variable (a variable that is never then read within the method). This bug is to investigate and hopefully remove the dead store.
resolved fixed
78a483d
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-03T00:28:44Z
2008-09-02T21:13:20Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
return getEnclosingClass().getType().getSourceLocation(); } else { int offset = 0; Kind kind = getKind(); if ((kind == MethodExecution) || (kind == ConstructorExecution) || (kind == AdviceExecution) || (kind == StaticInitialization) || (kind == PreInitialization) || (kind == Initialization)) { if (getEnclosingMethod().hasDeclaredLineNumberInfo()) { offset = getEnclosingMethod().getDeclarationOffset(); } } return getEnclosingClass().getType().getSourceContext().makeSourceLocation(sourceLine, offset); } } } public Shadow getEnclosingShadow() { return enclosingShadow; } public LazyMethodGen getEnclosingMethod() { return enclosingMethod; } public boolean isFallsThrough() { return !terminatesWithReturn(); } public void setActualTargetType(String className) { this.actualInstructionTargetType = className; } public String getActualTargetType() { return actualInstructionTargetType; } }
245,734
Bug 245734 AJDT throws a RuntimeException from EclipseResolvedMember.getAnnotations
Build ID: N/A Steps To Reproduce: This exception is happening for us in both Eclipse 3.4 and 3.3 when we run an incremental build on one of our projects. We are using an aspect to declare an annotation on a class in the project, and we only started seeing this exception after we added it. A clean build on the project never throws the exception, only an incremental build. More information: The Exception Stack Trace: java.lang.RuntimeException at org.aspectj.ajdt.internal.compiler.lookup.EclipseResolvedMember.getAnnotations(EclipseResolvedMember.java:78) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareAnnotations(AjLookupEnvironment.java:794) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:592) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironmen ... at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: RuntimeException thrown: not yet implemented - please raise an AJ bug I was going to include the AJDT Event log for the build but it is very long, and mostly unremarkable, so I have included only the section for the project where the exception was thrown. 11:9:50 Build kind = INCREMENTALBUILD 11:9:50 Project=ICODES, kind of build requested=Incremental AspectJ compilation 11:9:50 build: Examined delta - source file changes in required project ICODES 11:9:51 Found state instance managing output location : C:\jnaylor\Java_Dev\workspace\ICDM 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\workspace\Dependencies\MARVEL\resources 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_Dev\workspace\GSG 11:9:52 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\.build\Launch4J 11:9:52 Preparing for build: planning to be an incremental build 11:9:52 Starting incremental compilation loop 1 of possibly 5 11:9:52 AJDE Callback: finish. Was full build: false 11:9:52 Timer event: 2172ms: Total time spent in AJDE 11:9:54 Timer event: 47ms: Create element map (0 rels in project: ICODES) 11:9:54 Types affected during build = 0 11:9:54 Timer event: 0ms: Add markers (0 markers) 11:9:54 Timer event: 3735ms: Total time spent in AJBuilder.build() 11:9:54 =========================================================================================== This is occurring frequently, but not every time so we haven't been able to narrow down a reasonable sized test case.
resolved fixed
f376a21
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-22T23:58:59Z
2008-08-29T17:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseResolvedMember.java
/* ******************************************************************* * Copyright (c) 2006 Contributors * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Andy Clement initial implementation * ******************************************************************/ package org.aspectj.ajdt.internal.compiler.lookup; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.AnnotationMethodDeclaration; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Argument; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.FalseLiteral; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.FieldDeclaration; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.IntLiteral; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.StringLiteral; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TrueLiteral; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; import org.aspectj.org.eclipse.jdt.internal.compiler.impl.IntConstant; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding;
245,734
Bug 245734 AJDT throws a RuntimeException from EclipseResolvedMember.getAnnotations
Build ID: N/A Steps To Reproduce: This exception is happening for us in both Eclipse 3.4 and 3.3 when we run an incremental build on one of our projects. We are using an aspect to declare an annotation on a class in the project, and we only started seeing this exception after we added it. A clean build on the project never throws the exception, only an incremental build. More information: The Exception Stack Trace: java.lang.RuntimeException at org.aspectj.ajdt.internal.compiler.lookup.EclipseResolvedMember.getAnnotations(EclipseResolvedMember.java:78) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareAnnotations(AjLookupEnvironment.java:794) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:592) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironmen ... at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: RuntimeException thrown: not yet implemented - please raise an AJ bug I was going to include the AJDT Event log for the build but it is very long, and mostly unremarkable, so I have included only the section for the project where the exception was thrown. 11:9:50 Build kind = INCREMENTALBUILD 11:9:50 Project=ICODES, kind of build requested=Incremental AspectJ compilation 11:9:50 build: Examined delta - source file changes in required project ICODES 11:9:51 Found state instance managing output location : C:\jnaylor\Java_Dev\workspace\ICDM 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\workspace\Dependencies\MARVEL\resources 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_Dev\workspace\GSG 11:9:52 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\.build\Launch4J 11:9:52 Preparing for build: planning to be an incremental build 11:9:52 Starting incremental compilation loop 1 of possibly 5 11:9:52 AJDE Callback: finish. Was full build: false 11:9:52 Timer event: 2172ms: Total time spent in AJDE 11:9:54 Timer event: 47ms: Create element map (0 rels in project: ICODES) 11:9:54 Types affected during build = 0 11:9:54 Timer event: 0ms: Add markers (0 markers) 11:9:54 Timer event: 3735ms: Total time spent in AJBuilder.build() 11:9:54 =========================================================================================== This is occurring frequently, but not every time so we haven't been able to narrow down a reasonable sized test case.
resolved fixed
f376a21
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-22T23:58:59Z
2008-08-29T17:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseResolvedMember.java
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.FieldBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding; import org.aspectj.weaver.AnnotationAJ; import org.aspectj.weaver.BCException; import org.aspectj.weaver.MemberKind; import org.aspectj.weaver.ResolvedMemberImpl; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.World; /** * In the pipeline world, we can be weaving before all types have come through * from compilation. In some cases this means the weaver will want to ask * questions of eclipse types and this subtype of ResolvedMemberImpl is here to * answer some of those questions - it is backed by the real eclipse * MethodBinding object and can translate from Eclipse -> Weaver information. */ public class EclipseResolvedMember extends ResolvedMemberImpl { private static String[] NO_ARGS = new String[] {}; private Binding realBinding; private String[] argumentNames; private World w; private ResolvedType[] cachedAnnotationTypes; private EclipseFactory eclipseFactory; public EclipseResolvedMember(MethodBinding binding, MemberKind memberKind, ResolvedType realDeclaringType, int modifiers, UnresolvedType rettype, String name, UnresolvedType[] paramtypes, UnresolvedType[] extypes, EclipseFactory eclipseFactory) { super(memberKind, realDeclaringType, modifiers, rettype, name,
245,734
Bug 245734 AJDT throws a RuntimeException from EclipseResolvedMember.getAnnotations
Build ID: N/A Steps To Reproduce: This exception is happening for us in both Eclipse 3.4 and 3.3 when we run an incremental build on one of our projects. We are using an aspect to declare an annotation on a class in the project, and we only started seeing this exception after we added it. A clean build on the project never throws the exception, only an incremental build. More information: The Exception Stack Trace: java.lang.RuntimeException at org.aspectj.ajdt.internal.compiler.lookup.EclipseResolvedMember.getAnnotations(EclipseResolvedMember.java:78) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareAnnotations(AjLookupEnvironment.java:794) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:592) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironmen ... at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: RuntimeException thrown: not yet implemented - please raise an AJ bug I was going to include the AJDT Event log for the build but it is very long, and mostly unremarkable, so I have included only the section for the project where the exception was thrown. 11:9:50 Build kind = INCREMENTALBUILD 11:9:50 Project=ICODES, kind of build requested=Incremental AspectJ compilation 11:9:50 build: Examined delta - source file changes in required project ICODES 11:9:51 Found state instance managing output location : C:\jnaylor\Java_Dev\workspace\ICDM 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\workspace\Dependencies\MARVEL\resources 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_Dev\workspace\GSG 11:9:52 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\.build\Launch4J 11:9:52 Preparing for build: planning to be an incremental build 11:9:52 Starting incremental compilation loop 1 of possibly 5 11:9:52 AJDE Callback: finish. Was full build: false 11:9:52 Timer event: 2172ms: Total time spent in AJDE 11:9:54 Timer event: 47ms: Create element map (0 rels in project: ICODES) 11:9:54 Types affected during build = 0 11:9:54 Timer event: 0ms: Add markers (0 markers) 11:9:54 Timer event: 3735ms: Total time spent in AJBuilder.build() 11:9:54 =========================================================================================== This is occurring frequently, but not every time so we haven't been able to narrow down a reasonable sized test case.
resolved fixed
f376a21
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-22T23:58:59Z
2008-08-29T17:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseResolvedMember.java
paramtypes, extypes); this.realBinding = binding; this.eclipseFactory = eclipseFactory; this.w = realDeclaringType.getWorld(); } public EclipseResolvedMember(FieldBinding binding, MemberKind field, ResolvedType realDeclaringType, int modifiers, ResolvedType type, String string, UnresolvedType[] none) { super(field, realDeclaringType, modifiers, type, string, none); this.realBinding = binding; this.w = realDeclaringType.getWorld(); } public boolean hasAnnotation(UnresolvedType ofType) { ResolvedType[] annotationTypes = getAnnotationTypes(); if (annotationTypes == null) return false; for (int i = 0; i < annotationTypes.length; i++) { ResolvedType type = annotationTypes[i]; if (type.equals(ofType)) return true; } return false; } public AnnotationAJ[] getAnnotations() { realBinding.getAnnotationTagBits(); Annotation[] annos = getEclipseAnnotations(); if (annos == null) return null;
245,734
Bug 245734 AJDT throws a RuntimeException from EclipseResolvedMember.getAnnotations
Build ID: N/A Steps To Reproduce: This exception is happening for us in both Eclipse 3.4 and 3.3 when we run an incremental build on one of our projects. We are using an aspect to declare an annotation on a class in the project, and we only started seeing this exception after we added it. A clean build on the project never throws the exception, only an incremental build. More information: The Exception Stack Trace: java.lang.RuntimeException at org.aspectj.ajdt.internal.compiler.lookup.EclipseResolvedMember.getAnnotations(EclipseResolvedMember.java:78) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareAnnotations(AjLookupEnvironment.java:794) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:592) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironmen ... at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: RuntimeException thrown: not yet implemented - please raise an AJ bug I was going to include the AJDT Event log for the build but it is very long, and mostly unremarkable, so I have included only the section for the project where the exception was thrown. 11:9:50 Build kind = INCREMENTALBUILD 11:9:50 Project=ICODES, kind of build requested=Incremental AspectJ compilation 11:9:50 build: Examined delta - source file changes in required project ICODES 11:9:51 Found state instance managing output location : C:\jnaylor\Java_Dev\workspace\ICDM 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\workspace\Dependencies\MARVEL\resources 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_Dev\workspace\GSG 11:9:52 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\.build\Launch4J 11:9:52 Preparing for build: planning to be an incremental build 11:9:52 Starting incremental compilation loop 1 of possibly 5 11:9:52 AJDE Callback: finish. Was full build: false 11:9:52 Timer event: 2172ms: Total time spent in AJDE 11:9:54 Timer event: 47ms: Create element map (0 rels in project: ICODES) 11:9:54 Types affected during build = 0 11:9:54 Timer event: 0ms: Add markers (0 markers) 11:9:54 Timer event: 3735ms: Total time spent in AJBuilder.build() 11:9:54 =========================================================================================== This is occurring frequently, but not every time so we haven't been able to narrow down a reasonable sized test case.
resolved fixed
f376a21
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-22T23:58:59Z
2008-08-29T17:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseResolvedMember.java
throw new RuntimeException( "not yet implemented - please raise an AJ bug"); } public AnnotationAJ getAnnotationOfType(UnresolvedType ofType) { realBinding.getAnnotationTagBits(); Annotation[] annos = getEclipseAnnotations(); if (annos == null) return null; for (int i = 0; i < annos.length; i++) { Annotation anno = annos[i]; UnresolvedType ut = UnresolvedType.forSignature(new String( anno.resolvedType.signature())); if (w.resolve(ut).equals(ofType)) { return EclipseAnnotationConvertor.convertEclipseAnnotation( anno, w, eclipseFactory); } } return null; } public String getAnnotationDefaultValue() { if (realBinding instanceof MethodBinding) { AbstractMethodDeclaration methodDecl = getTypeDeclaration() .declarationOf((MethodBinding) realBinding); if (methodDecl instanceof AnnotationMethodDeclaration) { AnnotationMethodDeclaration annoMethodDecl = (AnnotationMethodDeclaration) methodDecl;
245,734
Bug 245734 AJDT throws a RuntimeException from EclipseResolvedMember.getAnnotations
Build ID: N/A Steps To Reproduce: This exception is happening for us in both Eclipse 3.4 and 3.3 when we run an incremental build on one of our projects. We are using an aspect to declare an annotation on a class in the project, and we only started seeing this exception after we added it. A clean build on the project never throws the exception, only an incremental build. More information: The Exception Stack Trace: java.lang.RuntimeException at org.aspectj.ajdt.internal.compiler.lookup.EclipseResolvedMember.getAnnotations(EclipseResolvedMember.java:78) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareAnnotations(AjLookupEnvironment.java:794) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:592) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironmen ... at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: RuntimeException thrown: not yet implemented - please raise an AJ bug I was going to include the AJDT Event log for the build but it is very long, and mostly unremarkable, so I have included only the section for the project where the exception was thrown. 11:9:50 Build kind = INCREMENTALBUILD 11:9:50 Project=ICODES, kind of build requested=Incremental AspectJ compilation 11:9:50 build: Examined delta - source file changes in required project ICODES 11:9:51 Found state instance managing output location : C:\jnaylor\Java_Dev\workspace\ICDM 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\workspace\Dependencies\MARVEL\resources 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_Dev\workspace\GSG 11:9:52 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\.build\Launch4J 11:9:52 Preparing for build: planning to be an incremental build 11:9:52 Starting incremental compilation loop 1 of possibly 5 11:9:52 AJDE Callback: finish. Was full build: false 11:9:52 Timer event: 2172ms: Total time spent in AJDE 11:9:54 Timer event: 47ms: Create element map (0 rels in project: ICODES) 11:9:54 Types affected during build = 0 11:9:54 Timer event: 0ms: Add markers (0 markers) 11:9:54 Timer event: 3735ms: Total time spent in AJBuilder.build() 11:9:54 =========================================================================================== This is occurring frequently, but not every time so we haven't been able to narrow down a reasonable sized test case.
resolved fixed
f376a21
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-22T23:58:59Z
2008-08-29T17:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseResolvedMember.java
Expression e = annoMethodDecl.defaultValue; if (e.resolvedType == null) e.resolve(methodDecl.scope); if (e instanceof QualifiedNameReference) { QualifiedNameReference qnr = (QualifiedNameReference) e; if (qnr.binding instanceof FieldBinding) { FieldBinding fb = (FieldBinding) qnr.binding; StringBuffer sb = new StringBuffer(); sb.append(fb.declaringClass.signature()); sb.append(fb.name); return sb.toString(); } } else if (e instanceof TrueLiteral) { return "true"; } else if (e instanceof FalseLiteral) { return "false"; } else if (e instanceof StringLiteral) { return new String(((StringLiteral) e).source()); } else if (e instanceof IntLiteral) { return Integer.toString(((IntConstant) e.constant) .intValue()); } else { throw new BCException( "EclipseResolvedMember.getAnnotationDefaultValue() not implemented for value of type '" + e.getClass() + "' - raise an AspectJ bug !"); } } }
245,734
Bug 245734 AJDT throws a RuntimeException from EclipseResolvedMember.getAnnotations
Build ID: N/A Steps To Reproduce: This exception is happening for us in both Eclipse 3.4 and 3.3 when we run an incremental build on one of our projects. We are using an aspect to declare an annotation on a class in the project, and we only started seeing this exception after we added it. A clean build on the project never throws the exception, only an incremental build. More information: The Exception Stack Trace: java.lang.RuntimeException at org.aspectj.ajdt.internal.compiler.lookup.EclipseResolvedMember.getAnnotations(EclipseResolvedMember.java:78) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareAnnotations(AjLookupEnvironment.java:794) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:592) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironmen ... at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: RuntimeException thrown: not yet implemented - please raise an AJ bug I was going to include the AJDT Event log for the build but it is very long, and mostly unremarkable, so I have included only the section for the project where the exception was thrown. 11:9:50 Build kind = INCREMENTALBUILD 11:9:50 Project=ICODES, kind of build requested=Incremental AspectJ compilation 11:9:50 build: Examined delta - source file changes in required project ICODES 11:9:51 Found state instance managing output location : C:\jnaylor\Java_Dev\workspace\ICDM 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\workspace\Dependencies\MARVEL\resources 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_Dev\workspace\GSG 11:9:52 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\.build\Launch4J 11:9:52 Preparing for build: planning to be an incremental build 11:9:52 Starting incremental compilation loop 1 of possibly 5 11:9:52 AJDE Callback: finish. Was full build: false 11:9:52 Timer event: 2172ms: Total time spent in AJDE 11:9:54 Timer event: 47ms: Create element map (0 rels in project: ICODES) 11:9:54 Types affected during build = 0 11:9:54 Timer event: 0ms: Add markers (0 markers) 11:9:54 Timer event: 3735ms: Total time spent in AJBuilder.build() 11:9:54 =========================================================================================== This is occurring frequently, but not every time so we haven't been able to narrow down a reasonable sized test case.
resolved fixed
f376a21
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-22T23:58:59Z
2008-08-29T17:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseResolvedMember.java
return null; } public ResolvedType[] getAnnotationTypes() { if (cachedAnnotationTypes == null) { realBinding.getAnnotationTagBits(); Annotation[] annos = getEclipseAnnotations(); if (annos == null) { cachedAnnotationTypes = ResolvedType.EMPTY_RESOLVED_TYPE_ARRAY; } else { cachedAnnotationTypes = new ResolvedType[annos.length]; for (int i = 0; i < annos.length; i++) { Annotation type = annos[i]; cachedAnnotationTypes[i] = w.resolve(UnresolvedType .forSignature(new String(type.resolvedType .signature()))); } } } return cachedAnnotationTypes; } public String[] getParameterNames() { if (argumentNames != null) return argumentNames; if (realBinding instanceof FieldBinding) { argumentNames = NO_ARGS; } else { TypeDeclaration typeDecl = getTypeDeclaration(); AbstractMethodDeclaration methodDecl = (typeDecl == null ? null : typeDecl.declarationOf((MethodBinding) realBinding));
245,734
Bug 245734 AJDT throws a RuntimeException from EclipseResolvedMember.getAnnotations
Build ID: N/A Steps To Reproduce: This exception is happening for us in both Eclipse 3.4 and 3.3 when we run an incremental build on one of our projects. We are using an aspect to declare an annotation on a class in the project, and we only started seeing this exception after we added it. A clean build on the project never throws the exception, only an incremental build. More information: The Exception Stack Trace: java.lang.RuntimeException at org.aspectj.ajdt.internal.compiler.lookup.EclipseResolvedMember.getAnnotations(EclipseResolvedMember.java:78) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareAnnotations(AjLookupEnvironment.java:794) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:592) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironmen ... at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: RuntimeException thrown: not yet implemented - please raise an AJ bug I was going to include the AJDT Event log for the build but it is very long, and mostly unremarkable, so I have included only the section for the project where the exception was thrown. 11:9:50 Build kind = INCREMENTALBUILD 11:9:50 Project=ICODES, kind of build requested=Incremental AspectJ compilation 11:9:50 build: Examined delta - source file changes in required project ICODES 11:9:51 Found state instance managing output location : C:\jnaylor\Java_Dev\workspace\ICDM 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\workspace\Dependencies\MARVEL\resources 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_Dev\workspace\GSG 11:9:52 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\.build\Launch4J 11:9:52 Preparing for build: planning to be an incremental build 11:9:52 Starting incremental compilation loop 1 of possibly 5 11:9:52 AJDE Callback: finish. Was full build: false 11:9:52 Timer event: 2172ms: Total time spent in AJDE 11:9:54 Timer event: 47ms: Create element map (0 rels in project: ICODES) 11:9:54 Types affected during build = 0 11:9:54 Timer event: 0ms: Add markers (0 markers) 11:9:54 Timer event: 3735ms: Total time spent in AJBuilder.build() 11:9:54 =========================================================================================== This is occurring frequently, but not every time so we haven't been able to narrow down a reasonable sized test case.
resolved fixed
f376a21
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-22T23:58:59Z
2008-08-29T17:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseResolvedMember.java
Argument[] args = (methodDecl == null ? null : methodDecl.arguments); if (args == null) { argumentNames = NO_ARGS; } else { argumentNames = new String[args.length]; for (int i = 0; i < argumentNames.length; i++) { argumentNames[i] = new String(methodDecl.arguments[i].name); } } } return argumentNames; } private Annotation[] getEclipseAnnotations() { if (realBinding instanceof MethodBinding) { AbstractMethodDeclaration methodDecl = getTypeDeclaration() .declarationOf((MethodBinding) realBinding); return methodDecl.annotations; } else if (realBinding instanceof FieldBinding) { FieldDeclaration fieldDecl = getTypeDeclaration().declarationOf( (FieldBinding) realBinding);
245,734
Bug 245734 AJDT throws a RuntimeException from EclipseResolvedMember.getAnnotations
Build ID: N/A Steps To Reproduce: This exception is happening for us in both Eclipse 3.4 and 3.3 when we run an incremental build on one of our projects. We are using an aspect to declare an annotation on a class in the project, and we only started seeing this exception after we added it. A clean build on the project never throws the exception, only an incremental build. More information: The Exception Stack Trace: java.lang.RuntimeException at org.aspectj.ajdt.internal.compiler.lookup.EclipseResolvedMember.getAnnotations(EclipseResolvedMember.java:78) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareAnnotations(AjLookupEnvironment.java:794) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:592) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironmen ... at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: RuntimeException thrown: not yet implemented - please raise an AJ bug I was going to include the AJDT Event log for the build but it is very long, and mostly unremarkable, so I have included only the section for the project where the exception was thrown. 11:9:50 Build kind = INCREMENTALBUILD 11:9:50 Project=ICODES, kind of build requested=Incremental AspectJ compilation 11:9:50 build: Examined delta - source file changes in required project ICODES 11:9:51 Found state instance managing output location : C:\jnaylor\Java_Dev\workspace\ICDM 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\workspace\Dependencies\MARVEL\resources 11:9:51 Failed to find a state instance managing output location : C:\jnaylor\Java_Dev\workspace\GSG 11:9:52 Failed to find a state instance managing output location : C:\jnaylor\Java_dev\.build\Launch4J 11:9:52 Preparing for build: planning to be an incremental build 11:9:52 Starting incremental compilation loop 1 of possibly 5 11:9:52 AJDE Callback: finish. Was full build: false 11:9:52 Timer event: 2172ms: Total time spent in AJDE 11:9:54 Timer event: 47ms: Create element map (0 rels in project: ICODES) 11:9:54 Types affected during build = 0 11:9:54 Timer event: 0ms: Add markers (0 markers) 11:9:54 Timer event: 3735ms: Total time spent in AJBuilder.build() 11:9:54 =========================================================================================== This is occurring frequently, but not every time so we haven't been able to narrow down a reasonable sized test case.
resolved fixed
f376a21
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-22T23:58:59Z
2008-08-29T17:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseResolvedMember.java
return fieldDecl.annotations; } return null; } private TypeDeclaration getTypeDeclaration() { if (realBinding instanceof MethodBinding) { MethodBinding mb = (MethodBinding) realBinding; if (mb != null) { SourceTypeBinding stb = (SourceTypeBinding) mb.declaringClass; if (stb != null) { ClassScope cScope = stb.scope; if (cScope != null) return cScope.referenceContext; } } } else if (realBinding instanceof FieldBinding) { FieldBinding fb = (FieldBinding) realBinding; if (fb != null) { SourceTypeBinding stb = (SourceTypeBinding) fb.declaringClass; if (stb != null) { ClassScope cScope = stb.scope; if (cScope != null) return cScope.referenceContext; } } } return null; } }
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
/******************************************************************** * Copyright (c) 2005 Contributors. All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http:eclipse.org/legal/epl-v10.html * * Contributors: * Andy Clement initial implementation * Helen Hawkins Converted to new interface (bug 148190) *******************************************************************/ package org.aspectj.systemtest.incremental.tools; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashSet; import java.util.Hashtable;
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
import java.util.Iterator; import java.util.List; import java.util.Set; import org.aspectj.ajde.core.ICompilerConfiguration; import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory; import org.aspectj.ajdt.internal.core.builder.AjState; import org.aspectj.ajdt.internal.core.builder.IncrementalStateManager; import org.aspectj.asm.AsmManager; import org.aspectj.asm.IElementHandleProvider; import org.aspectj.asm.IHierarchy; import org.aspectj.asm.IProgramElement; import org.aspectj.asm.IRelationship; import org.aspectj.asm.IRelationshipMap; import org.aspectj.asm.internal.JDTLikeHandleProvider; import org.aspectj.asm.internal.Relationship; import org.aspectj.bridge.IMessage; import org.aspectj.tools.ajc.Ajc; import org.aspectj.util.FileUtil; /** * The superclass knows all about talking through Ajde to the compiler. The superclass isn't in charge of knowing how to simulate * overlays for incremental builds, that is in here. As is the ability to generate valid build configs based on a directory * structure. To support this we just need access to a sandbox directory - this sandbox is managed by the superclass (it only * assumes all builds occur in <sandboxDir>/<projectName>/ ) * * The idea is you can initialize multiple projects in the sandbox and they can all be built independently, hopefully exploiting * incremental compilation. Between builds you can alter the contents of a project using the alter() method that overlays some set * of new files onto the current set (adding new files/changing existing ones) - you can then drive a new build and check it behaves * as expected. */ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementalAjdeInteractionTestbed {
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
/* * A.aj package pack; public aspect A { pointcut p() : call( C.method before() : p() { line 7 } } * * C.java package pack; public class C { public void method1() { method2(); line 6 } public void method2() { } public void * method3() { method2(); line 13 } * * } */ public void testDontLoseAdviceMarkers_pr134471() { try { initialiseProject("P4"); build("P4"); Ajc.dumpAJDEStructureModel("after full build where advice is applying"); alter("P4", "inc1"); build("P4"); checkWasntFullBuild(); Ajc.dumpAJDEStructureModel("after inc build where first advised line is gone"); IProgramElement codeElement = findCode(checkForNode("pack", "C", true));
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
IProgramElement advice = findAdvice(checkForNode("pack", "A", true)); IRelationshipMap asmRelMap = AsmManager.getDefault().getRelationshipMap(); assertEquals("There should be two relationships in the relationship map", 2, asmRelMap.getEntries().size()); for (Iterator iter = asmRelMap.getEntries().iterator(); iter.hasNext();) { String sourceOfRelationship = (String) iter.next(); IProgramElement ipe = AsmManager.getDefault().getHierarchy().findElementForHandle(sourceOfRelationship); assertNotNull("expected to find IProgramElement with handle " + sourceOfRelationship + " but didn't", ipe); if (ipe.getKind().equals(IProgramElement.Kind.ADVICE)) { assertEquals("expected source of relationship to be " + advice.toString() + " but found " + ipe.toString(), advice, ipe); } else if (ipe.getKind().equals(IProgramElement.Kind.CODE)) { assertEquals( "expected source of relationship to be " + codeElement.toString() + " but found " + ipe.toString(), codeElement, ipe); } else { fail("found unexpected relationship source " + ipe + " with kind " + ipe.getKind() + " when looking up handle: " + sourceOfRelationship); } List relationships = asmRelMap.get(ipe); assertNotNull("expected " + ipe.getName() + " to have some " + "relationships", relationships); for (Iterator iterator = relationships.iterator(); iterator.hasNext();) { Relationship rel = (Relationship) iterator.next(); List targets = rel.getTargets(); for (Iterator iterator2 = targets.iterator(); iterator2.hasNext();) { String t = (String) iterator2.next(); IProgramElement link = AsmManager.getDefault().getHierarchy().findElementForHandle(t); if (ipe.getKind().equals(IProgramElement.Kind.ADVICE)) { assertEquals("expected target of relationship to be " + codeElement.toString() + " but found " + link.toString(), codeElement, link);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
} else if (ipe.getKind().equals(IProgramElement.Kind.CODE)) { assertEquals("expected target of relationship to be " + advice.toString() + " but found " + link.toString(), advice, link); } else { fail("found unexpected relationship source " + ipe.getName() + " with kind " + ipe.getKind()); } } } } } finally { } } public void testIncrementalAndAnnotations() { initialiseProject("Annos"); build("Annos"); checkWasFullBuild(); checkCompileWeaveCount("Annos", 4, 4); assertEquals("Should be 3 relationships ", 3, AsmManager.getDefault().getRelationshipMap().getEntries().size()); alter("Annos", "inc1"); build("Annos"); checkWasntFullBuild(); assertEquals("Should be no relationships ", 0, AsmManager.getDefault().getRelationshipMap().getEntries().size()); checkCompileWeaveCount("Annos", 3, 3); alter("Annos", "inc2"); build("Annos"); checkWasntFullBuild(); assertEquals("Should be 3 relationships ", 3, AsmManager.getDefault().getRelationshipMap().getEntries().size()); checkCompileWeaveCount("Annos", 3, 3);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
} public void testBrokenHandles_pr247742() { String p = "BrokenHandles"; initialiseProject(p); build(p); dumptree(AsmManager.getDefault().getHierarchy().getRoot(), 0); IProgramElement root = AsmManager.getDefault().getHierarchy().getRoot(); IProgramElement ipe = findElementAtLine(root, 4); assertEquals("=BrokenHandles<p{GetInfo.java}GetInfo`declare warning", ipe.getHandleIdentifier()); ipe = findElementAtLine(root, 5); assertEquals("=BrokenHandles<p{GetInfo.java}GetInfo`declare warning!2", ipe.getHandleIdentifier()); ipe = findElementAtLine(root, 6); assertEquals("=BrokenHandles<p{GetInfo.java}GetInfo`declare parents!3", ipe.getHandleIdentifier()); } public void testSpacewarHandles() { String p = "Simpler"; initialiseProject(p); build(p); dumptree(AsmManager.getDefault().getHierarchy().getRoot(), 0); } public void testAdviceHandlesAreJDTCompatible() { String p = "AdviceHandles"; initialiseProject(p); addSourceFolderForSourceFile(p, getProjectRelativePath(p, "src/Handles.aj"), "src"); build(p);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
IProgramElement root = AsmManager.getDefault().getHierarchy().getRoot(); IProgramElement typeDecl = findElementAtLine(root, 4); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles", typeDecl.getHandleIdentifier()); IProgramElement advice1 = findElementAtLine(root, 7); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&before", advice1.getHandleIdentifier()); IProgramElement advice2 = findElementAtLine(root, 11); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&before!2", advice2.getHandleIdentifier()); IProgramElement advice3 = findElementAtLine(root, 15); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&before&I", advice3.getHandleIdentifier()); IProgramElement advice4 = findElementAtLine(root, 20); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&before&I!2", advice4.getHandleIdentifier()); IProgramElement advice5 = findElementAtLine(root, 25); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&after", advice5.getHandleIdentifier()); IProgramElement advice6 = findElementAtLine(root, 30); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&afterReturning", advice6.getHandleIdentifier()); IProgramElement advice7 = findElementAtLine(root, 35); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&afterThrowing", advice7.getHandleIdentifier()); IProgramElement advice8 = findElementAtLine(root, 40); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&afterThrowing&I", advice8.getHandleIdentifier()); IProgramElement namedInnerClass = findElementAtLine(root, 46); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~x[NamedClass", namedInnerClass.getHandleIdentifier()); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~foo[", findElementAtLine(root, 55).getHandleIdentifier()); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~foo[!2", findElementAtLine(root, 56).getHandleIdentifier()); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~b~QString;[", findElementAtLine(root, 62) .getHandleIdentifier()); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~b~QString;[!2", findElementAtLine(root, 63) .getHandleIdentifier()); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~c~QString;[", findElementAtLine(root, 66)
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
.getHandleIdentifier()); assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~c~QString;[!2", findElementAtLine(root, 67) .getHandleIdentifier()); } private IProgramElement findElementAtLine(IProgramElement whereToLook, int line) { if (whereToLook == null) { return null; }
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
if (whereToLook.getSourceLocation() != null && whereToLook.getSourceLocation().getLine() == line) { return whereToLook; } List kids = whereToLook.getChildren(); for (Iterator iterator = kids.iterator(); iterator.hasNext();) { IProgramElement object = (IProgramElement) iterator.next(); if (object.getSourceLocation() != null && object.getSourceLocation().getLine() == line) { return object; } IProgramElement gotSomething = findElementAtLine(object, line); if (gotSomething != null) { return gotSomething; } } return null; } public void testModelWithMultipleSourceFolders() { initialiseProject("MultiSource"); addSourceFolderForSourceFile("MultiSource", getProjectRelativePath("MultiSource", "src1/CodeOne.java"), "src1"); addSourceFolderForSourceFile("MultiSource", getProjectRelativePath("MultiSource", "src2/CodeTwo.java"), "src2"); addSourceFolderForSourceFile("MultiSource", getProjectRelativePath("MultiSource", "src3/pkg/CodeThree.java"), "src3"); build("MultiSource"); IProgramElement srcOne = AsmManager.getDefault().getHierarchy().findElementForHandle("=MultiSource/src1"); IProgramElement CodeOneClass = AsmManager.getDefault().getHierarchy().findElementForHandle( "=MultiSource/src1{CodeOne.java[CodeOne"); IProgramElement srcTwoPackage = AsmManager.getDefault().getHierarchy().findElementForHandle("=MultiSource/src2<pkg");
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
IProgramElement srcThreePackage = AsmManager.getDefault().getHierarchy().findElementForHandle("=MultiSource/src3<pkg"); assertNotNull(srcOne); assertNotNull(CodeOneClass); assertNotNull(srcTwoPackage); assertNotNull(srcThreePackage); if (srcTwoPackage.equals(srcThreePackage)) { throw new RuntimeException( "Should not have found these package nodes to be the same, they are in different source folders"); } } public static void dumptree(IProgramElement node, int indent) { for (int i = 0; i < indent; i++) System.out.print(" "); String loc = ""; if (node != null) { if (node.getSourceLocation() != null) loc = node.getSourceLocation().toString(); } System.out.println(node + " [" + (node == null ? "null" : node.getKind().toString()) + "] " + loc); if (node != null) { for (int i = 0; i < indent; i++) System.out.print(" "); System.out.println(" hid is " + node.getHandleIdentifier()); for (Iterator i = node.getChildren().iterator(); i.hasNext();) { dumptree((IProgramElement) i.next(), indent + 2); } } } public void testIncrementalItdsWithMultipleAspects_pr173729() {
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
initialiseProject("PR173729"); build("PR173729"); checkWasFullBuild(); alter("PR173729", "inc1"); build("PR173729"); checkWasntFullBuild(); } public void testTheBasics() { initialiseProject("P1"); build("P1"); build("P1"); checkWasntFullBuild(); checkCompileWeaveCount("P1", 0, 0); } public void testInvalidAspectpath_pr121395() { initialiseProject("P1"); File f = new File("foo.jar"); Set s = new HashSet(); s.add(f); configureAspectPath("P1", s); build("P1"); checkForError("P1", "invalid aspectpath entry"); } public void testAspectPath_pr242797_c46() { String bug = "pr242797_1"; String bug2 = "pr242797_2"; initialiseProject(bug);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
initialiseProject(bug2); configureAspectPath(bug2, getProjectRelativePath(bug, "bin")); build(bug); build(bug2); } public void testAspectPath_pr247742_c16() throws IOException { String bug = "AspectPathOne"; String bug2 = "AspectPathTwo"; addSourceFolderForSourceFile(bug2, getProjectRelativePath(bug2, "src/C.java"), "src"); initialiseProject(bug); initialiseProject(bug2); configureAspectPath(bug2, getProjectRelativePath(bug, "bin")); build(bug); build(bug2); IProgramElement root = AsmManager.getDefault().getHierarchy().getRoot(); assertEquals("=AspectPathTwo/binaries<pkg(Asp.class}Asp&before", findElementAtLine(root, 5).getHandleIdentifier()); assertEquals("=AspectPathTwo/binaries<(Asp2.class}Asp2&before", findElementAtLine(root, 16).getHandleIdentifier()); } /** * Build a project containing a resource - then mark the resource readOnly(), then do an inc-compile, it will report an error * about write access to the resource in the output folder being denied
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
*/ /* * public void testProblemCopyingResources_pr138171() { initialiseProject("PR138171"); * * File f=getProjectRelativePath("PR138171","res.txt"); Map m = new HashMap(); m.put("res.txt",f); * AjdeInteractionTestbed.MyProjectPropertiesAdapter .getInstance().setSourcePathResources(m); build("PR138171"); File f2 = * getProjectOutputRelativePath("PR138171","res.txt"); boolean successful = f2.setReadOnly(); * * alter("PR138171","inc1"); AjdeInteractionTestbed.MyProjectPropertiesAdapter .getInstance().setSourcePathResources(m); * build("PR138171"); List msgs = MyTaskListManager.getErrorMessages(); assertTrue("there should be one message but there are " * +(msgs==null?0:msgs.size())+":\n"+msgs,msgs!=null && msgs.size()==1); IMessage msg = (IMessage)msgs.get(0); String exp = * "unable to copy resource to output folder: 'res.txt'"; assertTrue("Expected message to include this text [" * +exp+"] but it does not: "+msg,msg.toString().indexOf(exp)!=-1); } */ public void testSimpleChanges() { AjdeInteractionTestbed.VERBOSE = true; initialiseProject("P1"); build("P1"); alter("P1", "inc1"); build("P1"); checkCompileWeaveCount("P1", 1, -1); build("P1"); checkCompileWeaveCount("P1", 0, -1); } public void testAddingAnAspect() { initialiseProject("P1"); build("P1"); alter("P1", "inc1");
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
alter("P1", "inc2"); build("P1"); long timeTakenForFullBuildAndWeave = getTimeTakenForBuild("P1"); checkWasFullBuild(); checkCompileWeaveCount("P1", 5, 3); build("P1"); long timeTakenForSimpleIncBuild = getTimeTakenForBuild("P1"); assertTrue("Should not take longer for the trivial incremental build! first=" + timeTakenForFullBuildAndWeave + "ms second=" + timeTakenForSimpleIncBuild + "ms", timeTakenForSimpleIncBuild < timeTakenForFullBuildAndWeave); } public void testBuildingTwoProjectsInTurns() { initialiseProject("P1"); initialiseProject("P2"); build("P1"); build("P2"); build("P1"); checkWasntFullBuild(); build("P2"); checkWasntFullBuild(); } public void testBuildingBrokenCode_pr240360() { AjdeInteractionTestbed.VERBOSE = true; initialiseProject("pr240360");
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
build("pr240360"); checkWasFullBuild(); checkCompileWeaveCount("pr240360", 5, 4); assertTrue("There should be an error:\n" + getErrorMessages("pr240360"), !getErrorMessages("pr240360").isEmpty()); Set s = AsmManager.getDefault().getRelationshipMap().getEntries(); int relmapLength = s.size(); String f = getWorkingDir().getAbsolutePath() + File.separatorChar + "pr240360" + File.separatorChar + "src" + File.separatorChar + "test" + File.separatorChar + "Error.java"; (new File(f)).delete(); build("pr240360"); checkWasntFullBuild(); checkCompileWeaveCount("pr240360", 0, 0); assertEquals(relmapLength, AsmManager.getDefault().getRelationshipMap().getEntries().size()); alter("pr240360", "inc1"); build("pr240360"); checkWasntFullBuild(); checkCompileWeaveCount("pr240360", 1, 0); assertEquals(relmapLength, AsmManager.getDefault().getRelationshipMap().getEntries().size()); alter("pr240360", "inc2"); build("pr240360"); checkWasFullBuild(); checkCompileWeaveCount("pr240360", 6, 4); assertEquals(relmapLength, AsmManager.getDefault().getRelationshipMap().getEntries().size()); } public void testBrokenCodeCompilation() { initialiseProject("pr102733_1");
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
build("pr102733_1"); checkWasFullBuild(); checkCompileWeaveCount("pr102733_1", 1, 0); assertTrue("There should be an error:\n" + getErrorMessages("pr102733_1"), !getErrorMessages("pr102733_1").isEmpty()); build("pr102733_1"); checkCompileWeaveCount("pr102733_1", 0, 0); checkWasntFullBuild(); alter("pr102733_1", "inc1"); build("pr102733_1"); checkWasntFullBuild(); checkCompileWeaveCount("pr102733_1", 1, 1); assertTrue("There should be no errors:\n" + getErrorMessages("pr102733_1"), getErrorMessages("pr102733_1").isEmpty()); alter("pr102733_1", "inc2"); build("pr102733_1"); checkWasntFullBuild(); checkCompileWeaveCount("pr102733_1", 1, 0); assertTrue("There should be an error:\n" + getErrorMessages("pr102733_1"), !getErrorMessages("pr102733_1").isEmpty()); } /*
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
* public void testRefactoring_pr148285() { configureBuildStructureModel(true); initialiseProject("PR148285"); * build("PR148285"); System.err.println("xxx"); alter("PR148285","inc1"); build("PR148285"); } */ /** * In order for this next test to run, I had to move the weaver/world pair we keep in the AjBuildManager instance down into the * state object - this makes perfect sense - otherwise when reusing the state for another project we'd not be switching to the * right weaver/world for that project. */ public void testBuildingTwoProjectsMakingSmallChanges() { initialiseProject("P1"); initialiseProject("P2"); build("P1"); build("P2"); build("P1"); checkWasntFullBuild(); build("P2"); checkWasntFullBuild(); alter("P1", "inc1"); alter("P1", "inc2"); build("P1"); checkWasFullBuild(); } public void testPr134371() { initialiseProject("PR134371"); build("PR134371"); alter("PR134371", "inc1"); build("PR134371"); assertTrue("There should be no exceptions handled:\n" + getErrorMessages("PR134371"), getErrorMessages("PR134371") .isEmpty()); }
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
/** * Setup up two simple projects and build them in turn - check the structure model is right after each build */ public void testBuildingTwoProjectsAndVerifyingModel() { initialiseProject("P1"); initialiseProject("P2"); build("P1"); checkForNode("pkg", "C", true); build("P2"); checkForNode("pkg", "C", false); build("P1"); checkForNode("pkg", "C", true); build("P2"); checkForNode("pkg", "C", false); } public void testBuildingTwoProjectsAndVerifyingStuff() { initialiseProject("P1"); initialiseProject("P2"); build("P1"); checkForNode("pkg", "C", true); build("P2"); checkForNode("pkg", "C", false); build("P1"); checkForNode("pkg", "C", true); build("P2"); checkForNode("pkg", "C", false); } /**
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
* Complex. Here we are testing that a state object records structural changes since the last full build correctly. We build a * simple project from scratch - this will be a full build and so the structural changes since last build count should be 0. We * then alter a class, adding a new method and check structural changes is 1. */ public void testStateManagement1() { File binDirectoryForP1 = new File(getFile("P1", "bin")); initialiseProject("P1"); build("P1"); AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(binDirectoryForP1); assertTrue("There should be a state object for project P1", ajs != null); assertTrue("Should be no structural changes as it was a full build but found: " + ajs.getNumberOfStructuralChangesSinceLastFullBuild(), ajs.getNumberOfStructuralChangesSinceLastFullBuild() == 0); alter("P1", "inc3"); build("P1"); checkWasntFullBuild(); ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("P1", "bin"))); assertTrue("There should be state for project P1", ajs != null); checkWasntFullBuild(); assertTrue("Should be one structural changes as it was a full build but found: " + ajs.getNumberOfStructuralChangesSinceLastFullBuild(), ajs.getNumberOfStructuralChangesSinceLastFullBuild() == 1); } /** * Complex. Here we are testing that a state object records structural changes since the last full build correctly. We build a * simple project from scratch - this will be a full build and so the structural changes since last build count should be 0. We * then alter a class, changing body of a method, not the structure and check struc changes is still 0. */ public void testStateManagement2() { File binDirectoryForP1 = new File(getFile("P1", "bin")); initialiseProject("P1"); alter("P1", "inc3");
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
build("P1"); AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(binDirectoryForP1); assertTrue("There should be state for project P1", ajs != null); assertTrue("Should be no struc changes as its a full build: " + ajs.getNumberOfStructuralChangesSinceLastFullBuild(), ajs .getNumberOfStructuralChangesSinceLastFullBuild() == 0); alter("P1", "inc4"); build("P1"); checkWasntFullBuild(); ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("P1", "bin"))); assertTrue("There should be state for project P1", ajs != null); checkWasntFullBuild(); assertTrue("Shouldn't be any structural changes but there were " + ajs.getNumberOfStructuralChangesSinceLastFullBuild(), ajs.getNumberOfStructuralChangesSinceLastFullBuild() == 0); } /** * The C.java file modified in this test has an inner class - this means the inner class has a this$0 field and <init>(C) ctor * to watch out for when checking for structural changes * */ public void testStateManagement3() { File binDirForInterproject1 = new File(getFile("interprojectdeps1", "bin")); initialiseProject("interprojectdeps1"); build("interprojectdeps1"); AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(binDirForInterproject1); assertTrue("There should be state for project P1", ajs != null); assertTrue("Should be no struc changes as its a full build: " + ajs.getNumberOfStructuralChangesSinceLastFullBuild(), ajs .getNumberOfStructuralChangesSinceLastFullBuild() == 0);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
alter("interprojectdeps1", "inc1"); build("interprojectdeps1"); checkWasntFullBuild(); ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("interprojectdeps1", "bin"))); assertTrue("There should be state for project interprojectdeps1", ajs != null); checkWasntFullBuild(); assertTrue("Shouldn't be any structural changes but there were " + ajs.getNumberOfStructuralChangesSinceLastFullBuild(), ajs.getNumberOfStructuralChangesSinceLastFullBuild() == 0); } /** * The C.java file modified in this test has an inner class - which has two ctors - this checks how they are mangled with an * instance of C. * */ public void testStateManagement4() { File binDirForInterproject2 = new File(getFile("interprojectdeps2", "bin")); initialiseProject("interprojectdeps2"); build("interprojectdeps2"); AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(binDirForInterproject2); assertTrue("There should be state for project interprojectdeps2", ajs != null); assertTrue("Should be no struc changes as its a full build: " + ajs.getNumberOfStructuralChangesSinceLastFullBuild(), ajs .getNumberOfStructuralChangesSinceLastFullBuild() == 0); alter("interprojectdeps2", "inc1"); build("interprojectdeps2"); checkWasntFullBuild(); ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("interprojectdeps2", "bin"))); assertTrue("There should be state for project interprojectdeps1", ajs != null); checkWasntFullBuild(); assertTrue("Shouldn't be any structural changes but there were " + ajs.getNumberOfStructuralChangesSinceLastFullBuild(), ajs.getNumberOfStructuralChangesSinceLastFullBuild() == 0);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
} /** * The C.java file modified in this test has an inner class - it has two ctors but also a reference to C.this in it - which will * give rise to an accessor being created in C * */ public void testStateManagement5() { File binDirForInterproject3 = new File(getFile("interprojectdeps3", "bin")); initialiseProject("interprojectdeps3"); build("interprojectdeps3"); AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(binDirForInterproject3); assertTrue("There should be state for project interprojectdeps3", ajs != null); assertTrue("Should be no struc changes as its a full build: " + ajs.getNumberOfStructuralChangesSinceLastFullBuild(), ajs .getNumberOfStructuralChangesSinceLastFullBuild() == 0); alter("interprojectdeps3", "inc1"); build("interprojectdeps3"); checkWasntFullBuild(); ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("interprojectdeps3", "bin"))); assertTrue("There should be state for project interprojectdeps1", ajs != null); checkWasntFullBuild(); assertTrue("Shouldn't be any structural changes but there were " + ajs.getNumberOfStructuralChangesSinceLastFullBuild(), ajs.getNumberOfStructuralChangesSinceLastFullBuild() == 0); } /** * Now the most complex test. Create a dependancy between two projects. Building one may affect whether the other does an * incremental or full build. The structural information recorded in the state object should be getting used to control whether * a full build is necessary... */ public void testBuildingDependantProjects() { initialiseProject("P1");
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
initialiseProject("P2"); configureNewProjectDependency("P2", "P1"); build("P1"); build("P2"); alter("P1", "inc1"); build("P1"); build("P2"); checkWasntFullBuild(); alter("P1", "inc3"); build("P1"); build("P2"); checkWasntFullBuild(); alter("P1", "inc4"); build("P1"); build("P2"); checkWasntFullBuild(); } public void testPr85132() { initialiseProject("PR85132"); build("PR85132"); alter("PR85132", "inc1"); build("PR85132"); } public void testPr125405() { initialiseProject("PR125405"); build("PR125405"); checkCompileWeaveCount("PR125405", 1, 1);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
alter("PR125405", "inc1"); build("PR125405"); checkForError("PR125405", "only abstract aspects can have type parameters"); alter("PR125405", "inc2"); build("PR125405"); checkCompileWeaveCount("PR125405", 1, 1); assertTrue("Should be no errors, but got " + getErrorMessages("PR125405"), getErrorMessages("PR125405").size() == 0); } public void testPr128618() { initialiseProject("PR128618_1"); initialiseProject("PR128618_2"); configureNewProjectDependency("PR128618_2", "PR128618_1"); assertTrue("there should be no warning messages before we start", getWarningMessages("PR128618_1").isEmpty()); assertTrue("there should be no warning messages before we start", getWarningMessages("PR128618_2").isEmpty()); build("PR128618_1"); build("PR128618_2"); List l = getWarningMessages("PR128618_2"); List warnings = getWarningMessages("PR128618_2"); assertTrue("Should be one warning, but there are #" + warnings.size(), warnings.size() == 1); IMessage msg = (IMessage) (getWarningMessages("PR128618_2").get(0)); assertEquals("warning should be against the FFDC.aj resource", "FFDC.aj", msg.getSourceLocation().getSourceFile().getName()); alter("PR128618_2", "inc1"); build("PR128618_2"); checkWasntFullBuild(); IMessage msg2 = (IMessage) (getWarningMessages("PR128618_2").get(0)); assertEquals("warning should be against the FFDC.aj resource", "FFDC.aj", msg2.getSourceLocation().getSourceFile() .getName()); assertFalse("a new warning message should have been generated", msg.equals(msg2));
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
} public void testPr92837() { initialiseProject("PR92837"); build("PR92837"); alter("PR92837", "inc1"); build("PR92837"); }
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
public void testPr117209() { try { initialiseProject("pr117209"); configureNonStandardCompileOptions("pr117209", "-proceedOnError"); build("pr117209"); checkCompileWeaveCount("pr117209", 6, 5); } finally { } } public void testPr114875() { if (System.getProperty("os.name", "").toLowerCase().equals("linux")) return; initialiseProject("pr114875"); build("pr114875"); alter("pr114875", "inc1"); build("pr114875"); checkWasFullBuild(); alter("pr114875", "inc2"); build("pr114875"); checkWasFullBuild(); } public void testPr117882() { initialiseProject("PR117882"); build("PR117882"); checkWasFullBuild();
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
alter("PR117882", "inc1"); build("PR117882"); checkWasFullBuild(); } public void testPr117882_2() { initialiseProject("PR117882_2"); build("PR117882_2"); checkWasFullBuild(); alter("PR117882_2", "inc1"); build("PR117882_2"); checkWasFullBuild(); } public void testPr115251() { initialiseProject("PR115251"); build("PR115251"); checkWasFullBuild(); alter("PR115251", "inc1"); build("PR115251"); checkWasFullBuild(); }
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
public void testPr220255_InfiniteBuildHasMember() { AjdeInteractionTestbed.VERBOSE = true; initialiseProject("pr220255"); configureNonStandardCompileOptions("pr220255", "-XhasMember"); build("pr220255"); checkWasFullBuild(); alter("pr220255", "inc1"); build("pr220255"); checkWasntFullBuild(); } public void testPr157054() { initialiseProject("PR157054"); configureNonStandardCompileOptions("PR157054", "-showWeaveInfo"); configureShowWeaveInfoMessages("PR157054", true); build("PR157054"); checkWasFullBuild(); List weaveMessages = getWeavingMessages("PR157054"); assertTrue("Should be two weaving messages but there are " + weaveMessages.size(), weaveMessages.size() == 2); alter("PR157054", "inc1"); build("PR157054"); weaveMessages = getWeavingMessages("PR157054"); assertTrue("Should be three weaving messages but there are " + weaveMessages.size(), weaveMessages.size() == 3); checkWasntFullBuild(); fullBuild("PR157054"); weaveMessages = getWeavingMessages("PR157054"); assertTrue("Should be three weaving messages but there are " + weaveMessages.size(), weaveMessages.size() == 3); } /** * Checks we aren't leaking mungers across compiles (accumulating multiple instances of the same one that all do the same * thing). On the first compile the munger is added late on - so at the time we set the count it is still zero. On the
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
* subsequent compiles we know about this extra one. */ public void testPr141956_IncrementallyCompilingAtAj() { initialiseProject("PR141956"); build("PR141956"); assertTrue("Should be zero but reports " + EclipseFactory.debug_mungerCount, EclipseFactory.debug_mungerCount == 0); alter("PR141956", "inc1"); build("PR141956"); assertTrue("Should be two but reports " + EclipseFactory.debug_mungerCount, EclipseFactory.debug_mungerCount == 2); alter("PR141956", "inc1"); build("PR141956"); assertTrue("Should be two but reports " + EclipseFactory.debug_mungerCount, EclipseFactory.debug_mungerCount == 2); alter("PR141956", "inc1"); build("PR141956"); assertTrue("Should be two but reports " + EclipseFactory.debug_mungerCount, EclipseFactory.debug_mungerCount == 2); alter("PR141956", "inc1"); build("PR141956"); assertTrue("Should be two but reports " + EclipseFactory.debug_mungerCount, EclipseFactory.debug_mungerCount == 2); } public void testPr121384() {
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
initialiseProject("pr121384"); configureNonStandardCompileOptions("pr121384", "-showWeaveInfo"); build("pr121384"); checkWasFullBuild(); alter("pr121384", "inc1"); build("pr121384"); checkWasntFullBuild(); } /* * public void testPr111779() { super.VERBOSE=true; initialiseProject("PR111779"); build("PR111779"); alter("PR111779","inc1"); * build("PR111779"); } */ public void testPr93310_1() { initialiseProject("PR93310_1"); build("PR93310_1"); checkWasFullBuild(); String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR93310_1" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "C2.java"; (new File(fileC2)).delete(); alter("PR93310_1", "inc1"); build("PR93310_1"); checkWasFullBuild(); int l = AjdeInteractionTestbed.MyStateListener.detectedDeletions.size(); assertTrue("Expected one deleted file to be noticed, but detected: " + l, l == 1); String name = (String) AjdeInteractionTestbed.MyStateListener.detectedDeletions.get(0); assertTrue("Should end with C2.java but is " + name, name.endsWith("C2.java")); } public void testPr93310_2() {
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
initialiseProject("PR93310_2"); build("PR93310_2"); checkWasFullBuild(); String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR93310_2" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "C2.java"; (new File(fileC2)).delete(); alter("PR93310_2", "inc1"); build("PR93310_2"); checkWasFullBuild(); int l = AjdeInteractionTestbed.MyStateListener.detectedDeletions.size(); assertTrue("Expected one deleted file to be noticed, but detected: " + l, l == 1); String name = (String) AjdeInteractionTestbed.MyStateListener.detectedDeletions.get(0); assertTrue("Should end with C2.java but is " + name, name.endsWith("C2.java")); } public void testPr113531() { initialiseProject("PR113531"); build("PR113531"); assertTrue("build should have compiled ok", getErrorMessages("PR113531").isEmpty()); alter("PR113531", "inc1"); build("PR113531"); assertEquals("error message should be 'foo cannot be resolved' ", "foo cannot be resolved", ((IMessage) getErrorMessages( "PR113531").get(0)).getMessage()); alter("PR113531", "inc2"); build("PR113531"); assertTrue("There should be no exceptions handled:\n" + getCompilerErrorMessages("PR113531"), getCompilerErrorMessages( "PR113531").isEmpty());
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
assertEquals("error message should be 'foo cannot be resolved' ", "foo cannot be resolved", ((IMessage) getErrorMessages( "PR113531").get(0)).getMessage()); } public void testPr119882() { initialiseProject("PR119882"); build("PR119882"); assertTrue("build should have compiled ok", getErrorMessages("PR119882").isEmpty()); alter("PR119882", "inc1"); build("PR119882"); List errors = getErrorMessages("PR119882"); assertTrue("Should be at least one error, but got none", errors.size() == 1); assertEquals("error message should be 'i cannot be resolved' ", "i cannot be resolved", ((IMessage) errors.get(0)) .getMessage()); alter("PR119882", "inc2"); build("PR119882"); assertTrue("There should be no exceptions handled:\n" + getCompilerErrorMessages("PR119882"), getCompilerErrorMessages( "PR119882").isEmpty()); assertEquals("error message should be 'i cannot be resolved' ", "i cannot be resolved", ((IMessage) errors.get(0)) .getMessage()); } public void testPr112736() { initialiseProject("PR112736");
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
build("PR112736"); checkWasFullBuild(); String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR112736" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "A.java"; (new File(fileC2)).delete(); alter("PR112736", "inc1"); build("PR112736"); checkWasFullBuild(); } /** * We have problems with multiple rewrites of a pointcut across incremental builds. */ public void testPr113257() { initialiseProject("PR113257"); build("PR113257"); alter("PR113257", "inc1"); build("PR113257"); checkWasFullBuild(); alter("PR113257", "inc1"); build("PR113257"); } public void testPr123612() { initialiseProject("PR123612"); build("PR123612"); alter("PR123612", "inc1"); build("PR123612"); checkWasFullBuild(); }
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
public void testPr152257() { initialiseProject("PR152257"); configureNonStandardCompileOptions("PR152257", "-XnoInline"); build("PR152257"); List errors = getErrorMessages("PR152257"); assertTrue("Should be no warnings, but there are #" + errors.size(), errors.size() == 0); checkWasFullBuild(); alter("PR152257", "inc1"); build("PR152257"); errors = getErrorMessages("PR152257"); assertTrue("Should be no warnings, but there are #" + errors.size(), errors.size() == 0); checkWasntFullBuild(); } public void testPr128655() { initialiseProject("pr128655"); configureNonStandardCompileOptions("pr128655", "-showWeaveInfo"); configureShowWeaveInfoMessages("pr128655", true); build("pr128655"); List firstBuildMessages = getWeavingMessages("pr128655"); assertTrue("Should be at least one message about the dec @type, but there were none", firstBuildMessages.size() > 0); alter("pr128655", "inc1"); build("pr128655"); checkWasntFullBuild(); List secondBuildMessages = getWeavingMessages("pr128655"); for (int i = 0; i < firstBuildMessages.size(); i++) { IMessage m1 = (IMessage) firstBuildMessages.get(i); IMessage m2 = (IMessage) secondBuildMessages.get(i); if (!m1.toString().equals(m2.toString())) { System.err.println("Message during first build was: " + m1);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
System.err.println("Message during second build was: " + m1); fail("The two messages should be the same, but are not: \n" + m1 + "!=" + m2); } } } public void testPr128655_2() { initialiseProject("pr128655_2"); configureNonStandardCompileOptions("pr128655_2", "-showWeaveInfo"); configureShowWeaveInfoMessages("pr128655_2", true); build("pr128655_2"); List firstBuildMessages = getWeavingMessages("pr128655_2"); assertTrue("Should be at least one message about the dec @type, but there were none", firstBuildMessages.size() > 0); alter("pr128655_2", "inc1"); build("pr128655_2"); checkWasntFullBuild(); List secondBuildMessages = getWeavingMessages("pr128655_2"); for (int i = 0; i < firstBuildMessages.size(); i++) { IMessage m1 = (IMessage) firstBuildMessages.get(i); IMessage m2 = (IMessage) secondBuildMessages.get(i); if (!m1.toString().equals(m2.toString())) { System.err.println("Message during first build was: " + m1); System.err.println("Message during second build was: " + m1); fail("The two messages should be the same, but are not: \n" + m1 + "!=" + m2); } } } public void testPr129163() {
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
initialiseProject("PR129613"); build("PR129613"); alter("PR129613", "inc1"); build("PR129613"); assertTrue("There should be no exceptions handled:\n" + getCompilerErrorMessages("PR129613"), getCompilerErrorMessages( "PR129613").isEmpty()); assertEquals("warning message should be 'no match for this type name: File [Xlint:invalidAbsoluteTypeName]' ", "no match for this type name: File [Xlint:invalidAbsoluteTypeName]", ((IMessage) getWarningMessages("PR129613") .get(0)).getMessage()); } public void testPr129163_2() { initialiseProject("pr129163_2"); build("pr129163_2"); checkWasFullBuild(); alter("pr129163_2", "inc1"); build("pr129163_2"); checkWasntFullBuild(); } public void testIncrementalIntelligence_Scenario01() { AjdeInteractionTestbed.VERBOSE = true;
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
initialiseProject("Project1"); initialiseProject("Project2"); configureNewProjectDependency("Project2", "Project1"); build("Project1"); build("Project2"); alter("Project1", "inc1"); build("Project1"); build("Project2"); checkWasntFullBuild(); alter("Project1", "inc2"); build("Project1"); build("Project2"); checkWasntFullBuild(); alter("Project1", "inc3"); build("Project1"); setNextChangeResponse("Project2", ICompilerConfiguration.EVERYTHING); build("Project2"); checkWasntFullBuild(); checkCompileWeaveCount("Project2", 1, 1); checkCompiled("Project2", "ClassAExtender"); alter("Project2", "inc1"); build("Project1"); build("Project2"); checkWasntFullBuild(); alter("Project1", "inc4"); build("Project1"); setNextChangeResponse("Project2", ICompilerConfiguration.EVERYTHING);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
build("Project2"); checkWasntFullBuild(); checkCompileWeaveCount("Project2", 2, 2); checkCompiled("Project2", "ClassAExtenderExtender"); } private void checkCompiled(String projectName, String typeNameSubstring) { List files = getCompiledFiles(projectName); boolean found = false; for (Iterator iterator = files.iterator(); iterator.hasNext();) { String object = (String) iterator.next(); if (object.indexOf(typeNameSubstring) != -1) found = true; } assertTrue("Did not find '" + typeNameSubstring + "' in list of compiled files", found); } /* * public void testPrReducingDependentBuilds_001_221427() { AjdeInteractionTestbed.VERBOSE=true; * IncrementalStateManager.debugIncrementalStates=true; initialiseProject("P221427_1"); initialiseProject("P221427_2"); * configureNewProjectDependency("P221427_2","P221427_1"); * * build("P221427_1"); build("P221427_2"); alter("P221427_1","inc1"); rename private class in super project * MyStateListener.reset(); build("P221427_1"); build("P221427_2"); * * AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("P221427_1","bin"))); * assertTrue("There should be state for project P221427_1",ajs!=null);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
* System.out.println(MyStateListener.getInstance().getDecisions()); checkWasntFullBuild(); * assertTrue("Should be one structural change but there were "+ ajs.getNumberOfStructuralChangesSinceLastFullBuild(), * ajs.getNumberOfStructuralChangesSinceLastFullBuild()==1); * * } * * Case002: changing a class to final that is extended in a dependent project public void * testPrReducingDependentBuilds_002_221427() { AjdeInteractionTestbed.VERBOSE=true; * IncrementalStateManager.debugIncrementalStates=true; initialiseProject("P221427_3"); initialiseProject("P221427_4"); * configureNewProjectDependency("P221427_4","P221427_3"); * * build("P221427_3"); build("P221427_4"); build OK, type in super project is non-final alter("P221427_3","inc1"); change * class declaration in super-project to final MyStateListener.reset(); build("P221427_3"); build("P221427_4"); build FAIL, * type in super project is now final * * AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("P221427_3","bin"))); * assertTrue("There should be state for project P221427_3",ajs!=null); * System.out.println(MyStateListener.getInstance().getDecisions()); * * List errors = getErrorMessages("P221427_4"); if (errors.size()!=1) { if (errors.size()==0) * fail("Expected error about not being able to extend final class"); for (Iterator iterator = errors.iterator(); * iterator.hasNext();) { Object object = (Object) iterator.next(); System.out.println(object); } * fail("Expected 1 error but got "+errors.size()); } assertTrue("Shouldn't be one structural change but there were "+ * ajs.getNumberOfStructuralChangesSinceLastFullBuild(), ajs.getNumberOfStructuralChangesSinceLastFullBuild()==1); * * } */
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
public void testPr129163_3() { initialiseProject("PR129163_4"); build("PR129163_4"); checkWasFullBuild(); initialiseProject("PR129163_3"); configureNewProjectDependency("PR129163_3", "PR129163_4"); build("PR129163_3"); checkWasFullBuild(); alter("PR129163_4", "inc1"); build("PR129163_4"); checkWasntFullBuild(); alter("PR129163_3", "inc1"); build("PR129163_3"); checkWasntFullBuild(); }
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
public void testPr133117() { initialiseProject("PR133117"); configureNonStandardCompileOptions("PR133117", "-Xlint:warning"); build("PR133117"); assertTrue("There should only be one xlint warning message reported:\n" + getWarningMessages("PR133117"), getWarningMessages("PR133117").size() == 1); alter("PR133117", "inc1"); build("PR133117"); List warnings = getWarningMessages("PR133117"); List noGuardWarnings = new ArrayList(); for (Iterator iter = warnings.iterator(); iter.hasNext();) { IMessage element = (IMessage) iter.next(); if (element.getMessage().indexOf("Xlint:noGuardForLazyTjp") != -1) { noGuardWarnings.add(element); } } assertTrue("There should only be two Xlint:noGuardForLazyTjp warning message reported:\n" + noGuardWarnings, noGuardWarnings.size() == 2); } public void testPr131505() { initialiseProject("PR131505"); configureNonStandardCompileOptions("PR131505", "-outxml"); build("PR131505"); checkWasFullBuild(); String outputDir = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR131505" + File.separatorChar + "bin"; checkXMLAspectCount("PR131505", "", 0, outputDir);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
alter("PR131505", "inc1"); build("PR131505"); checkWasFullBuild(); checkXMLAspectCount("PR131505", "", 1, outputDir); checkXMLAspectCount("PR131505", "A", 1, outputDir); alter("PR131505", "inc2"); build("PR131505"); checkWasntFullBuild(); checkXMLAspectCount("PR131505", "", 1, outputDir); checkXMLAspectCount("PR131505", "A", 1, outputDir); alter("PR131505", "inc3"); build("PR131505"); checkWasFullBuild(); checkXMLAspectCount("PR131505", "", 2, outputDir); checkXMLAspectCount("PR131505", "A1", 1, outputDir); checkXMLAspectCount("PR131505", "A", 1, outputDir); File a1 = new File(getWorkingDir().getAbsolutePath() + File.separatorChar + "PR131505" + File.separatorChar + "A1.aj"); a1.delete(); build("PR131505"); checkWasFullBuild(); checkXMLAspectCount("PR131505", "", 1, outputDir); checkXMLAspectCount("PR131505", "A1", 0, outputDir); checkXMLAspectCount("PR131505", "A", 1, outputDir);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
alter("PR131505", "inc4"); build("PR131505"); checkWasFullBuild(); checkXMLAspectCount("PR131505", "", 2, outputDir); checkXMLAspectCount("PR131505", "A", 1, outputDir); checkXMLAspectCount("PR131505", "pkg.A", 1, outputDir); } public void testPr136585() { initialiseProject("PR136585"); build("PR136585"); alter("PR136585", "inc1"); build("PR136585"); assertTrue("There should be no errors reported:\n" + getErrorMessages("PR136585"), getErrorMessages("PR136585").isEmpty()); } public void testPr133532() { initialiseProject("PR133532"); build("PR133532"); alter("PR133532", "inc1"); build("PR133532"); alter("PR133532", "inc2"); build("PR133532"); assertTrue("There should be no errors reported:\n" + getErrorMessages("PR133532"), getErrorMessages("PR133532").isEmpty()); } public void testPr133532_2() { initialiseProject("pr133532_2"); build("pr133532_2"); alter("pr133532_2", "inc2"); build("pr133532_2"); assertTrue("There should be no errors reported:\n" + getErrorMessages("pr133532_2"), getErrorMessages("pr133532_2")
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
.isEmpty()); String decisions = AjdeInteractionTestbed.MyStateListener.getDecisions(); String expect = "Need to recompile 'A.aj'"; assertTrue("Couldn't find build decision: '" + expect + "' in the list of decisions made:\n" + decisions, decisions .indexOf(expect) != -1); } public void testPr133532_3() { initialiseProject("PR133532_3"); build("PR133532_3"); alter("PR133532_3", "inc1"); build("PR133532_3"); assertTrue("There should be no errors reported:\n" + getErrorMessages("PR133532_3"), getErrorMessages("PR133532_3") .isEmpty()); } public void testPr134541() { initialiseProject("PR134541"); build("PR134541"); assertEquals("[Xlint:adviceDidNotMatch] should be associated with line 5", 5, ((IMessage) getWarningMessages("PR134541") .get(0)).getSourceLocation().getLine()); alter("PR134541", "inc1"); build("PR134541"); if (AsmManager.getDefault().getHandleProvider().dependsOnLocation()) checkWasFullBuild(); else checkWasntFullBuild(); assertEquals("[Xlint:adviceDidNotMatch] should now be associated with line 7", 7, ((IMessage) getWarningMessages("PR134541").get(0)).getSourceLocation().getLine()); }
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
public void testJDTLikeHandleProviderWithLstFile_pr141730() { IElementHandleProvider handleProvider = AsmManager.getDefault().getHandleProvider(); AsmManager.getDefault().setHandleProvider(new JDTLikeHandleProvider()); try { initialiseProject("JDTLikeHandleProvider"); build("JDTLikeHandleProvider"); IHierarchy top = AsmManager.getDefault().getHierarchy(); IProgramElement pe = top.findElementForType("pkg", "A"); String expectedHandle = "=JDTLikeHandleProvider<pkg*A.aj}A"; assertEquals("expected handle to be " + expectedHandle + ", but found " + pe.getHandleIdentifier(), expectedHandle, pe .getHandleIdentifier()); } finally { AsmManager.getDefault().setHandleProvider(handleProvider); } } public void testMovingAdviceDoesntChangeHandles_pr141730() { IElementHandleProvider handleProvider = AsmManager.getDefault().getHandleProvider(); AsmManager.getDefault().setHandleProvider(new JDTLikeHandleProvider()); try { initialiseProject("JDTLikeHandleProvider"); build("JDTLikeHandleProvider"); checkWasFullBuild(); IHierarchy top = AsmManager.getDefault().getHierarchy(); IProgramElement pe = top.findElementForLabel(top.getRoot(), IProgramElement.Kind.ADVICE, "before(): <anonymous pointcut>"); alter("JDTLikeHandleProvider", "inc1"); build("JDTLikeHandleProvider");
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
checkWasntFullBuild(); IHierarchy top2 = AsmManager.getDefault().getHierarchy(); IProgramElement pe2 = top.findElementForLabel(top2.getRoot(), IProgramElement.Kind.ADVICE, "before(): <anonymous pointcut>"); assertEquals("expected advice to be on line " + pe.getSourceLocation().getLine() + 1 + " but was on " + pe2.getSourceLocation().getLine(), pe.getSourceLocation().getLine() + 1, pe2.getSourceLocation().getLine()); assertEquals("expected advice to have handle " + pe.getHandleIdentifier() + " but found handle " + pe2.getHandleIdentifier(), pe.getHandleIdentifier(), pe2.getHandleIdentifier()); } finally { AsmManager.getDefault().setHandleProvider(handleProvider); } } public void testSwappingAdviceAndHandles_pr141730() { IElementHandleProvider handleProvider = AsmManager.getDefault().getHandleProvider(); AsmManager.getDefault().setHandleProvider(new JDTLikeHandleProvider()); try { initialiseProject("JDTLikeHandleProvider"); build("JDTLikeHandleProvider"); IHierarchy top = AsmManager.getDefault().getHierarchy(); IProgramElement call = top.findElementForLabel(top.getRoot(), IProgramElement.Kind.ADVICE, "after(): callPCD.."); IProgramElement exec = top.findElementForLabel(top.getRoot(), IProgramElement.Kind.ADVICE, "after(): execPCD.."); alter("JDTLikeHandleProvider", "inc2"); build("JDTLikeHandleProvider"); checkWasFullBuild(); IHierarchy top2 = AsmManager.getDefault().getHierarchy(); IProgramElement newCall = top2.findElementForLabel(top2.getRoot(), IProgramElement.Kind.ADVICE, "after(): callPCD..");
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
IProgramElement newExec = top2.findElementForLabel(top2.getRoot(), IProgramElement.Kind.ADVICE, "after(): execPCD.."); assertEquals("after swapping places, expected 'after(): callPCD..' " + "to be on line " + newExec.getSourceLocation().getLine() + " but was on line " + call.getSourceLocation().getLine(), newExec .getSourceLocation().getLine(), call.getSourceLocation().getLine()); assertEquals("after swapping places, expected 'after(): callPCD..' " + "to have handle " + exec.getHandleIdentifier() + " (because was full build) but had " + newCall.getHandleIdentifier(), exec.getHandleIdentifier(), newCall .getHandleIdentifier()); } finally { AsmManager.getDefault().setHandleProvider(handleProvider); } } public void testInitializerCountForJDTLikeHandleProvider_pr141730() { IElementHandleProvider handleProvider = AsmManager.getDefault().getHandleProvider(); AsmManager.getDefault().setHandleProvider(new JDTLikeHandleProvider()); try { initialiseProject("JDTLikeHandleProvider"); build("JDTLikeHandleProvider"); String expected = "=JDTLikeHandleProvider<pkg*A.aj[C|1"; IHierarchy top = AsmManager.getDefault().getHierarchy(); IProgramElement init = top.findElementForLabel(top.getRoot(), IProgramElement.Kind.INITIALIZER, "..."); assertEquals("expected initializers handle to be " + expected + "," + " but found " + init.getHandleIdentifier(true), expected, init.getHandleIdentifier(true)); alter("JDTLikeHandleProvider", "inc2"); build("JDTLikeHandleProvider"); checkWasFullBuild(); IHierarchy top2 = AsmManager.getDefault().getHierarchy(); IProgramElement init2 = top2.findElementForLabel(top2.getRoot(), IProgramElement.Kind.INITIALIZER, "..."); assertEquals("expected initializers handle to still be " + expected + "," + " but found " + init2.getHandleIdentifier(true), expected, init2.getHandleIdentifier(true)); } finally {
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
AsmManager.getDefault().setHandleProvider(handleProvider); } } public void testPr134471_IncrementalCompilationAndModelUpdates() { try { initialiseProject("PR134471"); configureNonStandardCompileOptions("PR134471", "-showWeaveInfo -emacssym"); configureShowWeaveInfoMessages("PR134471", true); build("PR134471"); IProgramElement nodeForTypeA = checkForNode("pkg", "A", true); IProgramElement nodeForAdvice = findAdvice(nodeForTypeA); List relatedElements = getRelatedElements(nodeForAdvice, 1); IProgramElement programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true))); int line = programElement.getSourceLocation().getLine(); assertTrue("advice should be at line 7 - but is at line " + line, line == 7); alter("PR134471", "inc1"); build("PR134471"); nodeForTypeA = checkForNode("pkg", "A", true); nodeForAdvice = findAdvice(nodeForTypeA); relatedElements = getRelatedElements(nodeForAdvice, 1);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true))); line = programElement.getSourceLocation().getLine(); assertTrue("advice should be at line 7 - but is at line " + line, line == 7); } finally { } } public void testPr134471_MovingAdvice() { initialiseProject("PR134471_2"); configureNonStandardCompileOptions("PR134471_2", "-showWeaveInfo -emacssym"); configureShowWeaveInfoMessages("PR134471_2", true); build("PR134471_2"); IProgramElement programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true))); int line = programElement.getSourceLocation().getLine(); assertTrue("advice should be at line 7 - but is at line " + line, line == 7); alter("PR134471_2", "inc1"); build("PR134471_2"); if (AsmManager.getDefault().getHandleProvider().dependsOnLocation()) checkWasFullBuild(); else checkWasntFullBuild();
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true))); line = programElement.getSourceLocation().getLine(); assertTrue("advice should be at line 11 - but is at line " + line, line == 11); } public void testAddingAndRemovingDecwWithStructureModel() { initialiseProject("P3"); build("P3"); alter("P3", "inc1"); build("P3"); assertTrue("There should be no exceptions handled:\n" + getCompilerErrorMessages("P3"), getCompilerErrorMessages("P3") .isEmpty()); alter("P3", "inc2"); build("P3"); assertTrue("There should be no exceptions handled:\n" + getCompilerErrorMessages("P3"), getCompilerErrorMessages("P3") .isEmpty()); } public void testPr134471_IncrementallyRecompilingTheAffectedClass() { try { initialiseProject("PR134471"); configureNonStandardCompileOptions("PR134471", "-showWeaveInfo -emacssym"); configureShowWeaveInfoMessages("PR134471", true);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
build("PR134471"); IProgramElement programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true))); int line = programElement.getSourceLocation().getLine(); assertTrue("advice should be at line 7 - but is at line " + line, line == 7); alter("PR134471", "inc1"); build("PR134471"); IProgramElement nodeForTypeA = checkForNode("pkg", "A", true); IProgramElement nodeForAdvice = findAdvice(nodeForTypeA); List relatedElements = getRelatedElements(nodeForAdvice, 1); alter("PR134471", "inc2"); build("PR134471"); checkWasntFullBuild(); programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true))); line = programElement.getSourceLocation().getLine(); assertTrue("advice should be at line 7 - but is at line " + line, line == 7); } finally { } } public void testPr134471_IncrementallyRecompilingAspectContainingDeclare() { initialiseProject("PR134471_3"); configureNonStandardCompileOptions("PR134471_3", "-showWeaveInfo -emacssym");
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
configureShowWeaveInfoMessages("PR134471_3", true); build("PR134471_3"); checkWasFullBuild(); IProgramElement programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true), 7)); int line = programElement.getSourceLocation().getLine(); assertTrue("declare warning should be at line 10 - but is at line " + line, line == 10); programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true), 6)); line = programElement.getSourceLocation().getLine(); assertTrue("advice should be at line 7 - but is at line " + line, line == 7); alter("PR134471_3", "inc1"); build("PR134471_3"); if (AsmManager.getDefault().getHandleProvider().dependsOnLocation()) checkWasFullBuild(); else checkWasntFullBuild(); programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true), 7)); line = programElement.getSourceLocation().getLine(); assertTrue("declare warning should be at line 12 - but is at line " + line, line == 12); alter("PR134471_3", "inc2");
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
build("PR134471_3"); checkWasntFullBuild(); programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true), 7)); line = programElement.getSourceLocation().getLine(); assertTrue("declare warning should be at line 12 - but is at line " + line, line == 12); } public void testPr134471_IncrementallyRecompilingTheClassAffectedByDeclare() { initialiseProject("PR134471_3"); configureNonStandardCompileOptions("PR134471_3", "-showWeaveInfo -emacssym"); configureShowWeaveInfoMessages("PR134471_3", true); build("PR134471_3"); checkWasFullBuild(); IProgramElement programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true), 7)); int line = programElement.getSourceLocation().getLine(); assertTrue("declare warning should be at line 10 - but is at line " + line, line == 10); programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true), 6)); line = programElement.getSourceLocation().getLine(); assertTrue("advice should be at line 7 - but is at line " + line, line == 7); alter("PR134471_3", "inc1"); build("PR134471_3"); if (AsmManager.getDefault().getHandleProvider().dependsOnLocation())
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
checkWasFullBuild(); else checkWasntFullBuild(); programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true), 7)); line = programElement.getSourceLocation().getLine(); assertTrue("declare warning should be at line 12 - but is at line " + line, line == 12); alter("PR134471_3", "inc2"); build("PR134471_3"); checkWasntFullBuild(); programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true), 7)); line = programElement.getSourceLocation().getLine(); assertTrue("declare warning should be at line 12 - but is at line " + line, line == 12); alter("PR134471_3", "inc3"); build("PR134471_3"); checkWasntFullBuild(); programElement = getFirstRelatedElement(findCode(checkForNode("pkg", "C", true), 7)); line = programElement.getSourceLocation().getLine(); assertTrue("declare warning should be at line 12 - but is at line " + line, line == 12);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
} public void testDontLoseXlintWarnings_pr141556() { initialiseProject("PR141556"); configureNonStandardCompileOptions("PR141556", "-Xlint:warning"); build("PR141556"); checkWasFullBuild(); String warningMessage = "can not build thisJoinPoint " + "lazily for this advice since it has no suitable guard " + "[Xlint:noGuardForLazyTjp]"; assertEquals("warning message should be '" + warningMessage + "'", warningMessage, ((IMessage) getWarningMessages( "PR141556").get(0)).getMessage()); alter("PR141556", "inc1"); alter("PR141556", "inc2"); build("PR141556"); checkWasntFullBuild(); assertTrue("there should still be a warning message ", !getWarningMessages("PR141556").isEmpty()); assertEquals("warning message should be '" + warningMessage + "'", warningMessage, ((IMessage) getWarningMessages( "PR141556").get(0)).getMessage()); } public void testAdviceDidNotMatch_pr152589() { initialiseProject("PR152589"); build("PR152589"); List warnings = getWarningMessages("PR152589"); assertTrue("There should be no warnings:\n" + warnings, warnings.isEmpty()); alter("PR152589", "inc1"); build("PR152589"); if (AsmManager.getDefault().getHandleProvider().dependsOnLocation()) checkWasFullBuild();
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
else checkWasntFullBuild(); warnings = getWarningMessages("PR152589"); assertTrue("There should be no warnings after adding a whitespace:\n" + warnings, warnings.isEmpty()); } public void testNoFullBuildOnChangeInSysOutInAdviceBody_pr154054() { initialiseProject("PR154054"); build("PR154054"); alter("PR154054", "inc1"); build("PR154054"); checkWasntFullBuild(); } public void testShouldFullBuildOnExceptionChange_pr154054() { initialiseProject("PR154054_2"); build("PR154054_2"); alter("PR154054_2", "inc1"); build("PR154054_2"); checkWasFullBuild(); } public void testPR158573() { IElementHandleProvider handleProvider = AsmManager.getDefault().getHandleProvider(); AsmManager.getDefault().setHandleProvider(new JDTLikeHandleProvider()); initialiseProject("PR158573"); build("PR158573"); List warnings = getWarningMessages("PR158573");
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
assertTrue("There should be no warnings:\n" + warnings, warnings.isEmpty()); alter("PR158573", "inc1"); build("PR158573"); checkWasntFullBuild(); warnings = getWarningMessages("PR158573"); assertTrue("There should be no warnings after changing the value of a " + "variable:\n" + warnings, warnings.isEmpty()); AsmManager.getDefault().setHandleProvider(handleProvider); } /** * If the user has specified that they want Java 6 compliance and kept the default classfile and source file level settings * (also 6.0) then expect an error saying that we don't support java 6. */ public void testPR164384_1() { initialiseProject("PR164384"); Hashtable javaOptions = new Hashtable(); javaOptions.put("org.eclipse.jdt.core.compiler.compliance", "1.6"); javaOptions.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "1.6"); javaOptions.put("org.eclipse.jdt.core.compiler.source", "1.6"); configureJavaOptionsMap("PR164384", javaOptions); build("PR164384"); List errors = getErrorMessages("PR164384"); if (getCompilerForProjectWithName("PR164384").isJava6Compatible()) { assertTrue("There should be no errors:\n" + errors, errors.isEmpty()); } else { String expectedError = "Java 6.0 compliance level is unsupported"; String found = ((IMessage) errors.get(0)).getMessage(); assertEquals("Expected 'Java 6.0 compliance level is unsupported'" + " error message but found " + found, expectedError, found);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
assertTrue("expected there to be more than the one compliance level" + " error but only found that one", errors.size() > 1); } } /** * If the user has specified that they want Java 6 compliance and selected classfile and source file level settings to be 5.0 * then expect an error saying that we don't support java 6. */ public void testPR164384_2() { initialiseProject("PR164384"); Hashtable javaOptions = new Hashtable(); javaOptions.put("org.eclipse.jdt.core.compiler.compliance", "1.6"); javaOptions.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "1.5"); javaOptions.put("org.eclipse.jdt.core.compiler.source", "1.5"); configureJavaOptionsMap("PR164384", javaOptions); build("PR164384"); List errors = getErrorMessages("PR164384"); if (getCompilerForProjectWithName("PR164384").isJava6Compatible()) { assertTrue("There should be no errors:\n" + errors, errors.isEmpty()); } else { String expectedError = "Java 6.0 compliance level is unsupported"; String found = ((IMessage) errors.get(0)).getMessage(); assertEquals("Expected 'Java 6.0 compliance level is unsupported'" + " error message but found " + found, expectedError, found); assertTrue("expected there to be more than the one compliance level" + " error but only found that one", errors.size() > 1);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
} } /** * If the user has specified that they want Java 6 compliance and set the classfile level to be 6.0 and source file level to be * 5.0 then expect an error saying that we don't support java 6. */ public void testPR164384_3() { initialiseProject("PR164384"); Hashtable javaOptions = new Hashtable(); javaOptions.put("org.eclipse.jdt.core.compiler.compliance", "1.6"); javaOptions.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "1.6"); javaOptions.put("org.eclipse.jdt.core.compiler.source", "1.5"); configureJavaOptionsMap("PR164384", javaOptions); build("PR164384"); List errors = getErrorMessages("PR164384"); if (getCompilerForProjectWithName("PR164384").isJava6Compatible()) { assertTrue("There should be no errros:\n" + errors, errors.isEmpty()); } else { String expectedError = "Java 6.0 compliance level is unsupported"; String found = ((IMessage) errors.get(0)).getMessage(); assertEquals("Expected 'Java 6.0 compliance level is unsupported'" + " error message but found " + found, expectedError, found); assertTrue("expected there to be more than the one compliance level" + " error but only found that one", errors.size() > 1); } } public void testPr168840() throws Exception {
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
initialiseProject("inpathTesting"); String inpathTestingDir = getWorkingDir() + File.separator + "inpathTesting"; String inpathDir = inpathTestingDir + File.separator + "injarBin" + File.separator + "pkg"; String expectedOutputDir = inpathTestingDir + File.separator + "bin"; File f = new File(inpathDir); Set s = new HashSet(); s.add(f); configureInPath("inpathTesting", s); build("inpathTesting"); List warnings = getWarningMessages("inpathTesting"); assertTrue("Expected there to be one warning message but found " + warnings.size() + ": " + warnings, warnings.size() == 1); File from = new File(testdataSrcDir + File.separatorChar + "inpathTesting" + File.separatorChar + "newInpathClass" + File.separatorChar + "InpathClass.class"); File destination = new File(inpathDir + File.separatorChar + "InpathClass.class"); FileUtil.copyFile(from, destination); build("inpathTesting"); checkWasntFullBuild(); warnings = getWarningMessages("inpathTesting"); assertTrue("Expected there to be two warning message but found " + warnings.size() + ": " + warnings, warnings.size() == 2); } /** * Retrieve program elements related to this one regardless of the relationship. A JUnit assertion is made that the number that * the 'expected' number are found.
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
* * @param programElement Program element whose related elements are to be found * @param expected the number of expected related elements */ private ListgetRelatedElements(IProgramElement programElement, int expected) { List relatedElements = getRelatedElements(programElement); StringBuffer debugString = new StringBuffer(); if (relatedElements != null) { for (Iterator iter = relatedElements.iterator(); iter.hasNext();) { String element = (String) iter.next(); debugString.append(AsmManager.getDefault().getHierarchy().findElementForHandle(element).toLabelString()).append( "\n"); } } assertTrue("Should be " + expected + " element" + (expected > 1 ? "s" : "") + " related to this one '" + programElement + "' but found :\n " + debugString, relatedElements != null && relatedElements.size() == 1); return relatedElements; } private IProgramElement getFirstRelatedElement(IProgramElement programElement) { List rels = getRelatedElements(programElement, 1); return AsmManager.getDefault().getHierarchy().findElementForHandle((String) rels.get(0)); } private ListgetRelatedElements(IProgramElement advice) { List output = null; IRelationshipMap map = AsmManager.getDefault().getRelationshipMap(); Listrels = map.get(advice); if (rels == null) fail("Did not find any related elements!"); for (Iterator iter = rels.iterator(); iter.hasNext();) { IRelationship element = (IRelationship) iter.next();
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
Listtargets = element.getTargets(); if (output == null) output = new ArrayList(); output.addAll(targets); } return output; } private IProgramElement findAdvice(IProgramElement ipe) { return findAdvice(ipe, 1); } private IProgramElement findAdvice(IProgramElement ipe, int whichOne) { if (ipe.getKind() == IProgramElement.Kind.ADVICE) { whichOne = whichOne - 1; if (whichOne == 0) return ipe; } List kids = ipe.getChildren(); for (Iterator iter = kids.iterator(); iter.hasNext();) { IProgramElement kid = (IProgramElement) iter.next(); IProgramElement found = findAdvice(kid, whichOne); if (found != null) return found; } return null; } /** * Finds the first 'code' program element below the element supplied - will return null if there aren't any */ private IProgramElement findCode(IProgramElement ipe) { return findCode(ipe, -1);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
} /** * Searches a hierarchy of program elements for a 'code' element at the specified line number, a line number of -1 means just * return the first one you find */ private IProgramElement findCode(IProgramElement ipe, int linenumber) { if (ipe.getKind() == IProgramElement.Kind.CODE) { if (linenumber == -1 || ipe.getSourceLocation().getLine() == linenumber) return ipe; } List kids = ipe.getChildren(); for (Iterator iter = kids.iterator(); iter.hasNext();) { IProgramElement kid = (IProgramElement) iter.next(); IProgramElement found = findCode(kid, linenumber); if (found != null) return found; } return null; } private IProgramElement checkForNode(String packageName, String typeName, boolean shouldBeFound) { IProgramElement ipe = AsmManager.getDefault().getHierarchy().findElementForType(packageName, typeName); if (shouldBeFound) { if (ipe == null) printModel(); assertTrue("Should have been able to find '" + packageName + "." + typeName + "' in the asm", ipe != null);
192,877
Bug 192877 [ataspectj] @AspectJ style inter-type declaration causes false compiler error during incremental build
Build ID: M20070212-1330 Steps To Reproduce: Use @DeclareParents to introduce a default interface implementation to an existing type. A full build compiles cleanly and works as expected. An incremental build causes the following type of compile error: "The type FooImpl must implement the inherited abstract method Test.methodA()". In this example FooImpl is the class we are introducing a default implementation of the Test interface which defines the method "methodA". More information: See attached zip for a complete set of files to reproduce. I can repoduce this bug with AJDT 1.4.2.200705221209 for Eclipse 3.2.2 as well as AJDT 1.5RC1 for Eclipse 3.3RC1
resolved fixed
9b68a31
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T20:51:53Z
2007-06-15T15:06:40Z
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
} else { if (ipe != null) printModel(); assertTrue("Should have NOT been able to find '" + packageName + "." + typeName + "' in the asm", ipe == null); } return ipe; } private void printModel() { try { AsmManager.dumptree(AsmManager.getDefault().getHierarchy().getRoot(), 0); } catch (IOException e) { e.printStackTrace(); } } private static void log(String msg) { if (VERBOSE) System.out.println(msg); } private File getProjectRelativePath(String p, String filename) { File projDir = new File(getWorkingDir(), p); return new File(projDir, filename); } private File getProjectOutputRelativePath(String p, String filename) { File projDir = new File(getWorkingDir(), p); return new File(projDir, "bin" + File.separator + filename); } private void assertNoErrors(String projectName) { assertTrue("Should be no errors, but got " + getErrorMessages(projectName), getErrorMessages(projectName).size() == 0); } }
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.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.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.classfile.ConstantPool; import org.aspectj.apache.bcel.classfile.Field; import org.aspectj.apache.bcel.generic.ArrayType; import org.aspectj.apache.bcel.generic.FieldInstruction; import org.aspectj.apache.bcel.generic.INVOKEINTERFACE; import org.aspectj.apache.bcel.generic.Instruction;
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
import org.aspectj.apache.bcel.generic.InstructionBranch; import org.aspectj.apache.bcel.generic.InstructionConstants; import org.aspectj.apache.bcel.generic.InstructionFactory; import org.aspectj.apache.bcel.generic.InstructionHandle; import org.aspectj.apache.bcel.generic.InstructionLV; import org.aspectj.apache.bcel.generic.InstructionList; import org.aspectj.apache.bcel.generic.InstructionTargeter; import org.aspectj.apache.bcel.generic.InvokeInstruction; import org.aspectj.apache.bcel.generic.LineNumberTag; import org.aspectj.apache.bcel.generic.LocalVariableTag; import org.aspectj.apache.bcel.generic.MULTIANEWARRAY; import org.aspectj.apache.bcel.generic.ObjectType; import org.aspectj.apache.bcel.generic.TargetLostException; import org.aspectj.apache.bcel.generic.Type; import org.aspectj.bridge.ISourceLocation; import org.aspectj.weaver.Advice; import org.aspectj.weaver.AdviceKind; import org.aspectj.weaver.AjcMemberMaker; import org.aspectj.weaver.BCException; import org.aspectj.weaver.IntMap; import org.aspectj.weaver.Member; import org.aspectj.weaver.MemberImpl; import org.aspectj.weaver.NameMangler; import org.aspectj.weaver.NewConstructorTypeMunger; import org.aspectj.weaver.NewFieldTypeMunger; import org.aspectj.weaver.NewMethodTypeMunger; import org.aspectj.weaver.ResolvedMember; import org.aspectj.weaver.ResolvedMemberImpl; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.Shadow;
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
import org.aspectj.weaver.ShadowMunger; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.WeaverMessages; import org.aspectj.weaver.World; import org.aspectj.weaver.ast.Var; import org.aspectj.weaver.patterns.AbstractPatternNodeVisitor; import org.aspectj.weaver.patterns.AndPointcut; import org.aspectj.weaver.patterns.NotPointcut; import org.aspectj.weaver.patterns.OrPointcut; import org.aspectj.weaver.patterns.ThisOrTargetPointcut; /* * Some fun implementation stuff: * * * expressionKind advice is non-execution advice * * may have a target. * * if the body is extracted, it will be extracted into * a static method. The first argument to the static * method is the target * * advice may expose a this object, but that's the advice's * consideration, not ours. This object will NOT be cached in another * local, but will always come from frame zero. * * * non-expressionKind advice is execution advice * * may have a this. * * target is same as this, and is exposed that way to advice * (i.e., target will not be cached, will always come from frame zero) * * if the body is extracted, it will be extracted into a method * with same static/dynamic modifier as enclosing method. If non-static, * target of callback call will be this. *
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
* * because of these two facts, the setup of the actual arguments (including * possible target) callback method is the same for both kinds of advice: * push the targetVar, if it exists (it will not exist for advice on static * things), then push all the argVars. * * Protected things: * * * the above is sufficient for non-expressionKind advice for protected things, * since the target will always be this. * * * For expressionKind things, we have to modify the signature of the callback * method slightly. For non-static expressionKind things, we modify * the first argument of the callback method NOT to be the type specified * by the method/field signature (the owner), but rather we type it to * the currentlyEnclosing type. We are guaranteed this will be fine, * since the verifier verifies that the target is a subtype of the currently * enclosingType. * * Worries: * * * ConstructorCalls will be weirder than all of these, since they * supposedly don't have a target (according to AspectJ), but they clearly * do have a target of sorts, just one that needs to be pushed on the stack, * dupped, and not touched otherwise until the constructor runs. * * @author Jim Hugunin * @author Erik Hilsdale * */ public class BcelShadow extends Shadow {
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
private ShadowRange range; private final BcelWorld world; private final LazyMethodGen enclosingMethod; public static boolean appliedLazyTjpOptimization; private String actualInstructionTargetType; /** * This generates an unassociated shadow, rooted in a particular method but not rooted to any particular point in the code. It * should be given to a rooted ShadowRange in the {@link ShadowRange#associateWithShadow(BcelShadow)} method. */ public BcelShadow(BcelWorld world, Kind kind, Member signature, LazyMethodGen enclosingMethod, BcelShadow enclosingShadow) { super(kind, signature, enclosingShadow); this.world = world; this.enclosingMethod = enclosingMethod; } public BcelShadow copyInto(LazyMethodGen recipient, BcelShadow enclosing) { BcelShadow s = new BcelShadow(world, getKind(), getSignature(), recipient, enclosing); if (mungers.size() > 0) { List src = mungers; if (s.mungers == Collections.EMPTY_LIST) s.mungers = new ArrayList(); List dest = s.mungers; for (Iterator i = src.iterator(); i.hasNext();) { dest.add(i.next()); }
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
} return s; } public World getIWorld() { return world; } private void deleteNewAndDup() { final ConstantPool cpg = getEnclosingClass().getConstantPool(); int depth = 1; InstructionHandle ih = range.getStart(); while (true) { Instruction inst = ih.getInstruction(); if (inst.opcode == Constants.INVOKESPECIAL && ((InvokeInstruction) inst).getName(cpg).equals("<init>")) { depth++; } else if (inst.opcode == Constants.NEW) { depth--; if (depth == 0) break; } else if (inst.opcode == Constants.DUP_X2) {
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
ih.setInstruction(InstructionConstants.DUP); } ih = ih.getPrev(); } InstructionHandle newHandle = ih; InstructionHandle endHandle = newHandle.getNext(); InstructionHandle nextHandle;
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
if (endHandle.getInstruction().opcode == Constants.DUP) { nextHandle = endHandle.getNext(); retargetFrom(newHandle, nextHandle); retargetFrom(endHandle, nextHandle); } else if (endHandle.getInstruction().opcode == Constants.DUP_X1) { InstructionHandle dupHandle = endHandle; endHandle = endHandle.getNext(); nextHandle = endHandle.getNext(); if (endHandle.getInstruction().opcode == Constants.SWAP) { } else { throw new RuntimeException("Unhandled kind of new " + endHandle); } retargetFrom(newHandle, nextHandle); retargetFrom(dupHandle, nextHandle); retargetFrom(endHandle, nextHandle); } else { endHandle = newHandle; nextHandle = endHandle.getNext(); retargetFrom(newHandle, nextHandle); getRange().insert(InstructionConstants.POP, Range.OutsideAfter); } try { range.getBody().delete(newHandle, endHandle); } catch (TargetLostException e) { throw new BCException("shouldn't happen");
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
} } private void retargetFrom(InstructionHandle old, InstructionHandle fresh) { InstructionTargeter[] sources = old.getTargetersArray(); if (sources != null) { for (int i = sources.length - 1; i >= 0; i--) { if (sources[i] instanceof ExceptionRange) { ExceptionRange it = (ExceptionRange) sources[i]; System.err.println("..."); it.updateTarget(old, fresh, it.getBody()); } else { sources[i].updateTarget(old, fresh); } } } } private List badAdvice = null; public void addAdvicePreventingLazyTjp(BcelAdvice advice) { if (badAdvice == null) badAdvice = new ArrayList(); badAdvice.add(advice); } protected void prepareForMungers() {
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
if (getKind() == ConstructorCall) { if (!world.isJoinpointArrayConstructionEnabled() || !this.getSignature().getDeclaringType().isArray()) deleteNewAndDup(); initializeArgVars(); } else if (getKind() == PreInitialization) { ShadowRange range = getRange(); range.insert(InstructionConstants.NOP, Range.InsideAfter); } else if (getKind() == ExceptionHandler) { ShadowRange range = getRange(); InstructionList body = range.getBody(); InstructionHandle start = range.getStart(); argVars = new BcelVar[1]; UnresolvedType tx = getArgType(0); argVars[0] = genTempVar(tx, "ajc$arg0"); InstructionHandle insertedInstruction = range.insert(argVars[0].createStore(getFactory()), Range.OutsideBefore); InstructionTargeter[] targeters = start.getTargetersArray(); for (int i = 0; i < targeters.length; i++) { InstructionTargeter t = targeters[i]; if (t instanceof ExceptionRange) {
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
ExceptionRange er = (ExceptionRange) t; er.updateTarget(start, insertedInstruction, body); } } } isThisJoinPointLazy = true; badAdvice = null; for (Iterator iter = mungers.iterator(); iter.hasNext();) { ShadowMunger munger = (ShadowMunger) iter.next(); munger.specializeOn(this); } initializeThisJoinPoint(); if (thisJoinPointVar != null && !isThisJoinPointLazy && badAdvice != null && badAdvice.size() > 1) { int valid = 0; for (Iterator iter = badAdvice.iterator(); iter.hasNext();) { BcelAdvice element = (BcelAdvice) iter.next(); ISourceLocation sLoc = element.getSourceLocation(); if (sLoc != null && sLoc.getLine() > 0) valid++; } if (valid != 0) { ISourceLocation[] badLocs = new ISourceLocation[valid]; int i = 0; for (Iterator iter = badAdvice.iterator(); iter.hasNext();) { BcelAdvice element = (BcelAdvice) iter.next(); ISourceLocation sLoc = element.getSourceLocation(); if (sLoc != null)
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
badLocs[i++] = sLoc; } world.getLint().multipleAdviceStoppingLazyTjp .signal(new String[] { this.toString() }, getSourceLocation(), badLocs); } } badAdvice = null; InstructionFactory fact = getFactory(); if (getKind().argsOnStack() && argVars != null) { if (getKind() == ExceptionHandler && range.getEnd().getNext().getInstruction().equals(InstructionConstants.POP)) { range.getEnd().getNext().setInstruction(InstructionConstants.NOP); } else {
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
range.insert(BcelRenderer.renderExprs(fact, world, argVars), Range.InsideBefore); if (targetVar != null) { range.insert(BcelRenderer.renderExpr(fact, world, targetVar), Range.InsideBefore); } if (getKind() == ConstructorCall) { if (!world.isJoinpointArrayConstructionEnabled() || !this.getSignature().getDeclaringType().isArray()) { range.insert(InstructionFactory.createDup(1), Range.InsideBefore); range.insert(fact.createNew((ObjectType) BcelWorld.makeBcelType(getSignature().getDeclaringType())), Range.InsideBefore); } } } } } public ShadowRange getRange() { return range; } public void setRange(ShadowRange range) { this.range = range; } private int sourceline = -1; public int getSourceLine() { if (sourceline != -1) return sourceline; Kind kind = getKind(); if ((kind == MethodExecution) || (kind == ConstructorExecution) || (kind == AdviceExecution)
186,884
Bug 186884 Unhandled Kind of New Exception when have advice for Pointcut call(Throwable+.new(..))
null
resolved fixed
7a398a2
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2008-09-30T22:55:35Z
2007-05-14T22:00:00Z
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
|| (kind == StaticInitialization) || (kind == PreInitialization) || (kind == Initialization)) { if (getEnclosingMethod().hasDeclaredLineNumberInfo()) { sourceline = getEnclosingMethod().getDeclarationLineNumber(); return sourceline; } } if (range == null) { if (getEnclosingMethod().hasBody()) { sourceline = Utility.getSourceLine(getEnclosingMethod().getBody().getStart()); return sourceline; } else { sourceline = 0; return sourceline; } } sourceline = Utility.getSourceLine(range.getStart()); if (sourceline < 0) sourceline = 0; return sourceline; } public UnresolvedType getEnclosingType() { return getEnclosingClass().getType(); } public LazyClassGen getEnclosingClass() { return enclosingMethod.getEnclosingClass(); } public BcelWorld getWorld() { return world; }