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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
*/
private final Map dangerousInterfaces = new HashMap();
public AjLookupEnvironment(ITypeRequestor typeRequestor, CompilerOptions options, ProblemReporter problemReporter,
INameEnvironment nameEnvironment) {
super(typeRequestor, options, problemReporter, nameEnvironment);
}
public void completeTypeBindings() {
AsmManager.setCompletingTypeBindings(true);
ContextToken completeTypeBindingsToken = CompilationAndWeavingContext.enteringPhase(
CompilationAndWeavingContext.COMPLETING_TYPE_BINDINGS, "");
stepCompleted = BUILD_TYPE_HIERARCHY;
for (int i = lastCompletedUnitIndex + 1; i <= lastUnitIndex; i++) {
ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.CHECK_AND_SET_IMPORTS,
units[i].compilationResult.fileName);
units[i].scope.checkAndSetImports();
CompilationAndWeavingContext.leavingPhase(tok);
}
stepCompleted = CHECK_AND_SET_IMPORTS;
for (int i = lastCompletedUnitIndex + 1; i <= lastUnitIndex; i++) {
ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.CONNECTING_TYPE_HIERARCHY,
units[i].compilationResult.fileName);
units[i].scope.connectTypeHierarchy();
CompilationAndWeavingContext.leavingPhase(tok);
}
stepCompleted = CONNECT_TYPE_HIERARCHY;
for (int i = lastCompletedUnitIndex + 1; i <= lastUnitIndex; i++) {
ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.BUILDING_FIELDS_AND_METHODS,
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
units[i].compilationResult.fileName);
units[i].scope.buildFieldsAndMethods();
CompilationAndWeavingContext.leavingPhase(tok);
}
for (int i = lastCompletedUnitIndex + 1; i <= lastUnitIndex; i++) {
SourceTypeBinding[] b = units[i].scope.topLevelTypes;
for (int j = 0; j < b.length; j++) {
factory.addSourceTypeBinding(b[j], units[i]);
}
}
AnonymousClassPublisher.aspectOf().setAnonymousClassCreationListener(this);
List<SourceTypeBinding> typesToProcess = new ArrayList<SourceTypeBinding>();
List<SourceTypeBinding> aspectsToProcess = new ArrayList<SourceTypeBinding>();
for (int i = lastCompletedUnitIndex + 1; i <= lastUnitIndex; i++) {
CompilationUnitScope cus = units[i].scope;
SourceTypeBinding[] stbs = cus.topLevelTypes;
for (int j = 0; j < stbs.length; j++) {
SourceTypeBinding stb = stbs[j];
typesToProcess.add(stb);
TypeDeclaration typeDeclaration = stb.scope.referenceContext;
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
if (typeDeclaration instanceof AspectDeclaration) {
aspectsToProcess.add(stb);
}
}
}
factory.getWorld().getCrosscuttingMembersSet().reset();
for (SourceTypeBinding aspectToProcess : aspectsToProcess) {
processInterTypeMemberTypes(aspectToProcess.scope);
}
while (typesToProcess.size() > 0) {
collectAllITDsAndDeclares(typesToProcess.get(0), typesToProcess);
}
factory.finishTypeMungers();
List<ConcreteTypeMunger> typeMungers = factory.getTypeMungers();
List<DeclareParents> declareParents = factory.getDeclareParents();
List<DeclareAnnotation> declareAnnotationOnTypes = factory.getDeclareAnnotationOnTypes();
doPendingWeaves();
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
boolean typeProcessingOrderIsImportant = declareParents.size() > 0 || declareAnnotationOnTypes.size() > 0;
if (typeProcessingOrderIsImportant) {
typesToProcess = new ArrayList();
for (int i = lastCompletedUnitIndex + 1; i <= lastUnitIndex; i++) {
CompilationUnitScope cus = units[i].scope;
SourceTypeBinding[] stbs = cus.topLevelTypes;
for (int j = 0; j < stbs.length; j++) {
SourceTypeBinding stb = stbs[j];
typesToProcess.add(stb);
}
}
while (typesToProcess.size() > 0) {
weaveIntertypes(typesToProcess, typesToProcess.get(0), typeMungers, declareParents, declareAnnotationOnTypes);
}
} else {
for (int i = lastCompletedUnitIndex + 1; i <= lastUnitIndex; i++) {
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
weaveInterTypeDeclarations(units[i].scope, typeMungers, declareParents, declareAnnotationOnTypes);
}
}
for (int i = lastCompletedUnitIndex + 1; i <= lastUnitIndex; i++) {
units[i].scope.checkParameterizedTypes();
}
for (int i = lastCompletedUnitIndex + 1; i <= lastUnitIndex; i++) {
SourceTypeBinding[] b = units[i].scope.topLevelTypes;
for (int j = 0; j < b.length; j++) {
ContextToken tok = CompilationAndWeavingContext.enteringPhase(
CompilationAndWeavingContext.RESOLVING_POINTCUT_DECLARATIONS, b[j].sourceName);
resolvePointcutDeclarations(b[j].scope);
CompilationAndWeavingContext.leavingPhase(tok);
}
}
for (int i = lastCompletedUnitIndex + 1; i <= lastUnitIndex; i++) {
SourceTypeBinding[] b = units[i].scope.topLevelTypes;
for (int j = 0; j < b.length; j++) {
ContextToken tok = CompilationAndWeavingContext.enteringPhase(
CompilationAndWeavingContext.ADDING_DECLARE_WARNINGS_AND_ERRORS, b[j].sourceName);
addAdviceLikeDeclares(b[j].scope);
CompilationAndWeavingContext.leavingPhase(tok);
}
}
for (int i = lastCompletedUnitIndex + 1; i <= lastUnitIndex; i++) {
units[i] = null;
}
stepCompleted = BUILD_FIELDS_AND_METHODS;
lastCompletedUnitIndex = lastUnitIndex;
AsmManager.setCompletingTypeBindings(false);
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
factory.getWorld().getCrosscuttingMembersSet().verify();
CompilationAndWeavingContext.leavingPhase(completeTypeBindingsToken);
}
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
public void doSupertypesFirst(ReferenceBinding rb, Collection yetToProcess) {
if (rb instanceof SourceTypeBinding) {
if (yetToProcess.contains(rb)) {
collectAllITDsAndDeclares((SourceTypeBinding) rb, yetToProcess);
}
} else if (rb instanceof ParameterizedTypeBinding) {
ParameterizedTypeBinding ptb = (ParameterizedTypeBinding) rb;
if (ptb.type instanceof SourceTypeBinding && yetToProcess.contains(ptb.type)) {
collectAllITDsAndDeclares((SourceTypeBinding) ptb.type, yetToProcess);
}
}
}
/**
* Find all the ITDs and Declares, but it is important we do this from the supertypes down to the subtypes.
*
* @param sourceType
* @param yetToProcess
*/
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
private void collectAllITDsAndDeclares(SourceTypeBinding sourceType, Collection yetToProcess) {
ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.COLLECTING_ITDS_AND_DECLARES,
sourceType.sourceName);
yetToProcess.remove(sourceType);
doSupertypesFirst(sourceType.superclass(), yetToProcess);
ReferenceBinding[] memberTypes = sourceType.memberTypes;
for (int i = 0, length = memberTypes.length; i < length; i++) {
SourceTypeBinding rb = (SourceTypeBinding) memberTypes[i];
if (!rb.superclass().equals(sourceType)) {
doSupertypesFirst(rb.superclass(), yetToProcess);
}
}
buildInterTypeAndPerClause(sourceType.scope);
addCrosscuttingStructures(sourceType.scope);
CompilationAndWeavingContext.leavingPhase(tok);
}
/**
* Weave the parents and intertype decls into a given type. This method looks at the supertype and superinterfaces for the
* specified type and recurses to weave those first if they are in the full list of types we are going to process during this
* compile... it stops recursing the first time it hits a type we aren't going to process during this compile. This could cause
* problems if you supply 'pieces' of a hierarchy, i.e. the bottom and the top, but not the middle - but what the hell are you
* doing if you do that?
*/
private void weaveIntertypes(List<SourceTypeBinding> typesToProcess, SourceTypeBinding typeToWeave,
List<ConcreteTypeMunger> typeMungers, List<DeclareParents> declareParents,
List<DeclareAnnotation> declareAnnotationOnTypes) {
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
ReferenceBinding superType = typeToWeave.superclass();
if (typesToProcess.contains(superType) && superType instanceof SourceTypeBinding) {
weaveIntertypes(typesToProcess, (SourceTypeBinding) superType, typeMungers, declareParents, declareAnnotationOnTypes);
}
ReferenceBinding[] interfaceTypes = typeToWeave.superInterfaces();
for (int i = 0; i < interfaceTypes.length; i++) {
ReferenceBinding binding = interfaceTypes[i];
if (typesToProcess.contains(binding) && binding instanceof SourceTypeBinding) {
weaveIntertypes(typesToProcess, (SourceTypeBinding) binding, typeMungers, declareParents, declareAnnotationOnTypes);
}
}
weaveInterTypeDeclarations(typeToWeave, typeMungers, declareParents, declareAnnotationOnTypes, false);
typesToProcess.remove(typeToWeave);
}
private void doPendingWeaves() {
for (Iterator i = pendingTypesToWeave.iterator(); i.hasNext();) {
SourceTypeBinding t = (SourceTypeBinding) i.next();
ContextToken tok = CompilationAndWeavingContext.enteringPhase(
CompilationAndWeavingContext.WEAVING_INTERTYPE_DECLARATIONS, t.sourceName);
weaveInterTypeDeclarations(t);
CompilationAndWeavingContext.leavingPhase(tok);
}
pendingTypesToWeave.clear();
}
private void addAdviceLikeDeclares(ClassScope s) {
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
TypeDeclaration dec = s.referenceContext;
if (dec instanceof AspectDeclaration) {
ResolvedType typeX = factory.fromEclipse(dec.binding);
factory.getWorld().getCrosscuttingMembersSet().addAdviceLikeDeclares(typeX);
}
SourceTypeBinding sourceType = s.referenceContext.binding;
ReferenceBinding[] memberTypes = sourceType.memberTypes;
for (int i = 0, length = memberTypes.length; i < length; i++) {
addAdviceLikeDeclares(((SourceTypeBinding) memberTypes[i]).scope);
}
}
private void addCrosscuttingStructures(ClassScope s) {
TypeDeclaration dec = s.referenceContext;
if (dec instanceof AspectDeclaration) {
ResolvedType typeX = factory.fromEclipse(dec.binding);
factory.getWorld().getCrosscuttingMembersSet().addOrReplaceAspect(typeX, false);
if (typeX.getSuperclass().isAspect() && !typeX.getSuperclass().isExposedToWeaver()) {
factory.getWorld().getCrosscuttingMembersSet().addOrReplaceAspect(typeX.getSuperclass(), false);
}
}
SourceTypeBinding sourceType = s.referenceContext.binding;
ReferenceBinding[] memberTypes = sourceType.memberTypes;
for (int i = 0, length = memberTypes.length; i < length; i++) {
addCrosscuttingStructures(((SourceTypeBinding) memberTypes[i]).scope);
}
}
private void resolvePointcutDeclarations(ClassScope s) {
TypeDeclaration dec = s.referenceContext;
SourceTypeBinding sourceType = s.referenceContext.binding;
boolean hasPointcuts = false;
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
AbstractMethodDeclaration[] methods = dec.methods;
boolean initializedMethods = false;
if (methods != null) {
for (int i = 0; i < methods.length; i++) {
if (methods[i] instanceof PointcutDeclaration) {
hasPointcuts = true;
if (!initializedMethods) {
sourceType.methods();
initializedMethods = true;
}
((PointcutDeclaration) methods[i]).resolvePointcut(s);
}
}
}
if (hasPointcuts || dec instanceof AspectDeclaration || couldBeAnnotationStyleAspectDeclaration(dec)) {
ReferenceType name = (ReferenceType) factory.fromEclipse(sourceType);
EclipseSourceType eclipseSourceType = (EclipseSourceType) name.getDelegate();
eclipseSourceType.checkPointcutDeclarations();
}
ReferenceBinding[] memberTypes = sourceType.memberTypes;
for (int i = 0, length = memberTypes.length; i < length; i++) {
resolvePointcutDeclarations(((SourceTypeBinding) memberTypes[i]).scope);
}
}
/**
* Return true if the declaration has @Aspect annotation. Called 'couldBe' rather than 'is' because someone else may have
* defined an annotation called Aspect - we can't verify the full name (including package name) because it may not have been
* resolved just yet and rather going through expensive resolution when we dont have to, this gives us a cheap check that tells
* us whether to bother.
*/
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
private boolean couldBeAnnotationStyleAspectDeclaration(TypeDeclaration dec) {
Annotation[] annotations = dec.annotations;
boolean couldBeAtAspect = false;
if (annotations != null) {
for (int i = 0; i < annotations.length && !couldBeAtAspect; i++) {
if (annotations[i].toString().equals("@Aspect")) {
couldBeAtAspect = true;
}
}
}
return couldBeAtAspect;
}
/**
* Applies any intertype member type declarations up front.
*/
private void processInterTypeMemberTypes(ClassScope classScope) {
TypeDeclaration dec = classScope.referenceContext;
if (dec instanceof AspectDeclaration) {
((AspectDeclaration) dec).processIntertypeMemberTypes(classScope);
}
}
private void buildInterTypeAndPerClause(ClassScope s) {
TypeDeclaration dec = s.referenceContext;
if (dec instanceof AspectDeclaration) {
((AspectDeclaration) dec).buildInterTypeAndPerClause(s);
}
SourceTypeBinding sourceType = s.referenceContext.binding;
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
if (sourceType.superclass != null) {
ResolvedType parent = factory.fromEclipse(sourceType.superclass);
if (parent.isAspect() && !isAspect(dec)) {
factory.showMessage(IMessage.ERROR, "class \'" + new String(sourceType.sourceName) + "\' can not extend aspect \'"
+ parent.getName() + "\'", factory.fromEclipse(sourceType).getSourceLocation(), null);
}
}
ReferenceBinding[] memberTypes = sourceType.memberTypes;
for (int i = 0, length = memberTypes.length; i < length; i++) {
buildInterTypeAndPerClause(((SourceTypeBinding) memberTypes[i]).scope);
}
}
private boolean isAspect(TypeDeclaration decl) {
if ((decl instanceof AspectDeclaration)) {
return true;
} else if (decl.annotations == null) {
return false;
} else {
for (int i = 0; i < decl.annotations.length; i++) {
Annotation ann = decl.annotations[i];
if (ann.type instanceof SingleTypeReference) {
if (CharOperation.equals("Aspect".toCharArray(), ((SingleTypeReference) ann.type).token)) {
return true;
}
} else if (ann.type instanceof QualifiedTypeReference) {
QualifiedTypeReference qtr = (QualifiedTypeReference) ann.type;
if (qtr.tokens.length != 5) {
return false;
}
if (!CharOperation.equals("org".toCharArray(), qtr.tokens[0])) {
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
return false;
}
if (!CharOperation.equals("aspectj".toCharArray(), qtr.tokens[1])) {
return false;
}
if (!CharOperation.equals("lang".toCharArray(), qtr.tokens[2])) {
return false;
}
if (!CharOperation.equals("annotation".toCharArray(), qtr.tokens[3])) {
return false;
}
if (!CharOperation.equals("Aspect".toCharArray(), qtr.tokens[4])) {
return false;
}
return true;
}
}
}
return false;
}
private void weaveInterTypeDeclarations(CompilationUnitScope unit, List<ConcreteTypeMunger> typeMungers,
List<DeclareParents> declareParents, List<DeclareAnnotation> declareAnnotationOnTypes) {
for (int i = 0, length = unit.topLevelTypes.length; i < length; i++) {
weaveInterTypeDeclarations(unit.topLevelTypes[i], typeMungers, declareParents, declareAnnotationOnTypes, false);
}
}
private void weaveInterTypeDeclarations(SourceTypeBinding sourceType) {
if (!factory.areTypeMungersFinished()) {
if (!pendingTypesToWeave.contains(sourceType)) {
pendingTypesToWeave.add(sourceType);
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
}
} else {
weaveInterTypeDeclarations(sourceType, factory.getTypeMungers(), factory.getDeclareParents(),
factory.getDeclareAnnotationOnTypes(), true);
}
}
private void weaveInterTypeDeclarations(SourceTypeBinding sourceType, List<ConcreteTypeMunger> typeMungers,
List<DeclareParents> declareParents, List<DeclareAnnotation> declareAnnotationOnTypes, boolean skipInners) {
ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.WEAVING_INTERTYPE_DECLARATIONS,
sourceType.sourceName);
ResolvedType onType = factory.fromEclipse(sourceType);
if (onType.isRawType()) {
onType = onType.getGenericType();
}
WeaverStateInfo info = onType.getWeaverState();
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
if (info != null && !info.isOldStyle() && !info.isReweavable()) {
processTypeMungersFromExistingWeaverState(sourceType, onType);
CompilationAndWeavingContext.leavingPhase(tok);
return;
}
for (Iterator i = dangerousInterfaces.entrySet().iterator(); i.hasNext();) {
Map.Entry entry = (Map.Entry) i.next();
ResolvedType interfaceType = (ResolvedType) entry.getKey();
if (onType.isTopmostImplementor(interfaceType)) {
factory.showMessage(IMessage.ERROR, onType + ": " + entry.getValue(), onType.getSourceLocation(), null);
}
}
boolean needOldStyleWarning = (info != null && info.isOldStyle());
onType.clearInterTypeMungers();
onType.ensureConsistent();
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
List decpToRepeat = new ArrayList();
List<DeclareAnnotation> decaToRepeat = new ArrayList<DeclareAnnotation>();
boolean anyNewParents = false;
boolean anyNewAnnotations = false;
for (Iterator i = declareParents.iterator(); i.hasNext();) {
DeclareParents decp = (DeclareParents) i.next();
if (!decp.isMixin()) {
boolean didSomething = doDeclareParents(decp, sourceType);
if (didSomething) {
if (factory.pushinCollector != null) {
factory.pushinCollector.tagAsMunged(sourceType, decp.getParents().get(0));
}
anyNewParents = true;
} else {
if (!decp.getChild().isStarAnnotation()) {
decpToRepeat.add(decp);
}
}
}
}
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
for (Iterator<DeclareAnnotation> i = declareAnnotationOnTypes.iterator(); i.hasNext();) {
DeclareAnnotation deca = i.next();
boolean didSomething = doDeclareAnnotations(deca, sourceType, true);
if (didSomething) {
anyNewAnnotations = true;
} else {
if (!deca.getTypePattern().isStar()) {
decaToRepeat.add(deca);
}
}
}
while ((anyNewAnnotations || anyNewParents) && (!decpToRepeat.isEmpty() || !decaToRepeat.isEmpty())) {
anyNewParents = anyNewAnnotations = false;
List forRemoval = new ArrayList();
for (Iterator i = decpToRepeat.iterator(); i.hasNext();) {
DeclareParents decp = (DeclareParents) i.next();
boolean didSomething = doDeclareParents(decp, sourceType);
if (didSomething) {
if (factory.pushinCollector != null) {
factory.pushinCollector.tagAsMunged(sourceType, decp.getParents().get(0));
}
anyNewParents = true;
forRemoval.add(decp);
}
}
decpToRepeat.removeAll(forRemoval);
forRemoval.clear();
for (Iterator i = declareAnnotationOnTypes.iterator(); i.hasNext();) {
DeclareAnnotation deca = (DeclareAnnotation) i.next();
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
boolean didSomething = doDeclareAnnotations(deca, sourceType, false);
if (didSomething) {
if (factory.pushinCollector != null) {
factory.pushinCollector.tagAsMunged(sourceType, deca.getAnnotationString());
}
anyNewAnnotations = true;
forRemoval.add(deca);
}
}
decaToRepeat.removeAll(forRemoval);
}
for (Iterator<ConcreteTypeMunger> i = typeMungers.iterator(); i.hasNext();) {
EclipseTypeMunger munger = (EclipseTypeMunger) i.next();
if (munger.matches(onType)) {
if (needOldStyleWarning) {
factory.showMessage(IMessage.WARNING, "The class for " + onType
+ " should be recompiled with ajc-1.1.1 for best results", onType.getSourceLocation(), null);
needOldStyleWarning = false;
}
onType.addInterTypeMunger(munger, true);
if (munger.getMunger() != null && munger.getMunger().getKind() == ResolvedTypeMunger.InnerClass) {
if (munger.munge(sourceType, onType)) {
if (factory.pushinCollector != null) {
factory.pushinCollector.tagAsMunged(sourceType, munger.getSourceMethod());
}
}
}
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
}
}
onType.checkInterTypeMungers();
for (Iterator i = onType.getInterTypeMungers().iterator(); i.hasNext();) {
EclipseTypeMunger munger = (EclipseTypeMunger) i.next();
if (munger.getMunger() == null || munger.getMunger().getKind() != ResolvedTypeMunger.InnerClass) {
if (munger.munge(sourceType, onType)) {
if (factory.pushinCollector != null) {
factory.pushinCollector.tagAsMunged(sourceType, munger.getSourceMethod());
}
}
}
}
if (skipInners) {
CompilationAndWeavingContext.leavingPhase(tok);
return;
}
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
ReferenceBinding[] memberTypes = sourceType.memberTypes;
for (int i = 0, length = memberTypes.length; i < length; i++) {
if (memberTypes[i] instanceof SourceTypeBinding) {
weaveInterTypeDeclarations((SourceTypeBinding) memberTypes[i], typeMungers, declareParents,
declareAnnotationOnTypes, false);
}
}
CompilationAndWeavingContext.leavingPhase(tok);
}
/**
* Called when we discover we are weaving intertype declarations on some type that has an existing 'WeaverStateInfo' object -
* this is typically some previously woven type that has been passed on the inpath.
*
* sourceType and onType are the 'same type' - the former is the 'Eclipse' version and the latter is the 'Weaver' version.
*/
private void processTypeMungersFromExistingWeaverState(SourceTypeBinding sourceType, ResolvedType onType) {
Collection previouslyAppliedMungers = onType.getWeaverState().getTypeMungers(onType);
for (Iterator i = previouslyAppliedMungers.iterator(); i.hasNext();) {
ConcreteTypeMunger m = (ConcreteTypeMunger) i.next();
EclipseTypeMunger munger = factory.makeEclipseTypeMunger(m);
if (munger.munge(sourceType, onType)) {
if (onType.isInterface() && munger.getMunger().needsAccessToTopmostImplementor()) {
if (!onType.getWorld().getCrosscuttingMembersSet().containsAspect(munger.getAspectType())) {
dangerousInterfaces
.put(onType, "implementors of " + onType + " must be woven by " + munger.getAspectType());
}
}
}
}
}
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
private boolean doDeclareParents(DeclareParents declareParents, SourceTypeBinding sourceType) {
ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_DECLARE_PARENTS,
sourceType.sourceName);
ResolvedType resolvedSourceType = factory.fromEclipse(sourceType);
List newParents = declareParents.findMatchingNewParents(resolvedSourceType, false);
if (!newParents.isEmpty()) {
for (Iterator i = newParents.iterator(); i.hasNext();) {
ResolvedType parent = (ResolvedType) i.next();
if (dangerousInterfaces.containsKey(parent)) {
ResolvedType onType = factory.fromEclipse(sourceType);
factory.showMessage(IMessage.ERROR, onType + ": " + dangerousInterfaces.get(parent),
onType.getSourceLocation(), null);
}
if (Modifier.isFinal(parent.getModifiers())) {
factory.showMessage(IMessage.ERROR, "cannot extend final class " + parent.getClassName(),
declareParents.getSourceLocation(), null);
} else {
if (!resolvedSourceType.isExposedToWeaver()) {
return false;
}
addParent(sourceType, parent);
}
}
CompilationAndWeavingContext.leavingPhase(tok);
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
return true;
}
CompilationAndWeavingContext.leavingPhase(tok);
return false;
}
private String stringifyTargets(long bits) {
if ((bits & TagBits.AnnotationTargetMASK) == 0) {
return "";
}
Set s = new HashSet();
if ((bits & TagBits.AnnotationForAnnotationType) != 0) {
s.add("ANNOTATION_TYPE");
}
if ((bits & TagBits.AnnotationForConstructor) != 0) {
s.add("CONSTRUCTOR");
}
if ((bits & TagBits.AnnotationForField) != 0) {
s.add("FIELD");
}
if ((bits & TagBits.AnnotationForLocalVariable) != 0) {
s.add("LOCAL_VARIABLE");
}
if ((bits & TagBits.AnnotationForMethod) != 0) {
s.add("METHOD");
}
if ((bits & TagBits.AnnotationForPackage) != 0) {
s.add("PACKAGE");
}
if ((bits & TagBits.AnnotationForParameter) != 0) {
s.add("PARAMETER");
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
}
if ((bits & TagBits.AnnotationForType) != 0) {
s.add("TYPE");
}
StringBuffer sb = new StringBuffer();
sb.append("{");
for (Iterator iter = s.iterator(); iter.hasNext();) {
String element = (String) iter.next();
sb.append(element);
if (iter.hasNext()) {
sb.append(",");
}
}
sb.append("}");
return sb.toString();
}
private boolean doDeclareAnnotations(DeclareAnnotation decA, SourceTypeBinding sourceType, boolean reportProblems) {
ResolvedType rtx = factory.fromEclipse(sourceType);
if (!decA.matches(rtx)) {
return false;
}
if (!rtx.isExposedToWeaver()) {
return false;
}
ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_DECLARE_ANNOTATIONS,
sourceType.sourceName);
UnresolvedType aspectType = decA.getAspect();
if (aspectType instanceof ReferenceType) {
ReferenceType rt = (ReferenceType) aspectType;
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
if (rt.isParameterizedType() || rt.isRawType()) {
aspectType = rt.getGenericType();
}
}
TypeBinding tb = factory.makeTypeBinding(aspectType);
SourceTypeBinding stb = (SourceTypeBinding) tb;
Annotation[] toAdd = null;
long abits = 0;
AbstractMethodDeclaration methodDecl = null;
if (stb instanceof BinaryTypeBinding) {
toAdd = retrieveAnnotationFromBinaryTypeBinding(decA, stb);
if (toAdd != null && toAdd.length > 0 && toAdd[0].resolvedType != null) {
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
abits = toAdd[0].resolvedType.getAnnotationTagBits();
}
} else if (stb != null) {
char[] declareSelector = decA.getAnnotationMethod().toCharArray();
ReferenceBinding rb = stb;
String declaringAspectName = decA.getDeclaringType().getRawName();
while (rb != null && !new String(CharOperation.concatWith(rb.compoundName, '.')).equals(declaringAspectName)) {
rb = rb.superclass();
}
MethodBinding[] mbs = rb.getMethods(declareSelector);
ReferenceBinding declaringBinding = mbs[0].declaringClass;
if (declaringBinding instanceof ParameterizedTypeBinding) {
declaringBinding = ((ParameterizedTypeBinding) declaringBinding).type;
}
if (declaringBinding instanceof BinaryTypeBinding) {
toAdd = retrieveAnnotationFromBinaryTypeBinding(decA, declaringBinding);
if (toAdd != null && toAdd.length > 0 && toAdd[0].resolvedType != null) {
abits = toAdd[0].resolvedType.getAnnotationTagBits();
}
} else {
abits = mbs[0].getAnnotationTagBits();
TypeDeclaration typeDecl = ((SourceTypeBinding) declaringBinding).scope.referenceContext;
methodDecl = typeDecl.declarationOf(mbs[0]);
toAdd = methodDecl.annotations;
toAdd[0] = createAnnotationCopy(toAdd[0]);
if (toAdd[0].resolvedType != null) {
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
abits = toAdd[0].resolvedType.getAnnotationTagBits();
}
}
}
if (toAdd == null || toAdd[0] == null || toAdd[0].type == null) {
CompilationAndWeavingContext.leavingPhase(tok);
return false;
}
if (sourceType instanceof BinaryTypeBinding) {
ResolvedType theTargetType = factory.fromEclipse(sourceType);
TypeBinding theAnnotationType = toAdd[0].resolvedType;
if (theAnnotationType == null) {
return false;
}
String sig = new String(theAnnotationType.signature());
UnresolvedType bcelAnnotationType = UnresolvedType.forSignature(sig);
String name = bcelAnnotationType.getName();
if (theTargetType.hasAnnotation(bcelAnnotationType)) {
CompilationAndWeavingContext.leavingPhase(tok);
return false;
}
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
boolean giveupnow = false;
if (((abits & TagBits.AnnotationTargetMASK) != 0)) {
if (isAnnotationTargettingSomethingOtherThanAnnotationOrNormal(abits)) {
giveupnow = true;
} else if ((sourceType.isAnnotationType() && (abits & TagBits.AnnotationForAnnotationType) == 0)
|| (!sourceType.isAnnotationType() && (abits & TagBits.AnnotationForType) == 0)) {
if (reportProblems) {
if (decA.isExactPattern()) {
factory.showMessage(IMessage.ERROR, WeaverMessages.format(
WeaverMessages.INCORRECT_TARGET_FOR_DECLARE_ANNOTATION, rtx.getName(), toAdd[0].type,
stringifyTargets(abits)), decA.getSourceLocation(), null);
}
}
giveupnow = true;
}
}
if (giveupnow) {
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
CompilationAndWeavingContext.leavingPhase(tok);
return false;
}
theTargetType.addAnnotation(new BcelAnnotation(new FakeAnnotation(name, sig,
(abits & TagBits.AnnotationRuntimeRetention) != 0), factory.getWorld()));
CompilationAndWeavingContext.leavingPhase(tok);
return true;
}
Annotation currentAnnotations[] = sourceType.scope.referenceContext.annotations;
if (currentAnnotations != null) {
for (int i = 0; i < currentAnnotations.length; i++) {
Annotation annotation = currentAnnotations[i];
String a = CharOperation.toString(annotation.type.getTypeName());
String b = CharOperation.toString(toAdd[0].type.getTypeName());
if (a.equals(b)) {
CompilationAndWeavingContext.leavingPhase(tok);
return false;
}
}
}
if (((abits & TagBits.AnnotationTargetMASK) != 0)) {
if ((abits & (TagBits.AnnotationForAnnotationType | TagBits.AnnotationForType)) == 0) {
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
CompilationAndWeavingContext.leavingPhase(tok);
return false;
}
if ((sourceType.isAnnotationType() && (abits & TagBits.AnnotationForAnnotationType) == 0)
|| (!sourceType.isAnnotationType() && (abits & TagBits.AnnotationForType) == 0)) {
if (reportProblems) {
if (decA.isExactPattern()) {
factory.showMessage(IMessage.ERROR, WeaverMessages.format(
WeaverMessages.INCORRECT_TARGET_FOR_DECLARE_ANNOTATION, rtx.getName(), toAdd[0].type,
stringifyTargets(abits)), decA.getSourceLocation(), null);
}
}
CompilationAndWeavingContext.leavingPhase(tok);
return false;
}
}
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
sourceType.scope.referenceContext.rememberAnnotations();
Annotation abefore[] = sourceType.scope.referenceContext.annotations;
Annotation[] newset = new Annotation[toAdd.length + (abefore == null ? 0 : abefore.length)];
System.arraycopy(toAdd, 0, newset, 0, toAdd.length);
if (abefore != null) {
System.arraycopy(abefore, 0, newset, toAdd.length, abefore.length);
}
sourceType.scope.referenceContext.annotations = newset;
CompilationAndWeavingContext.leavingPhase(tok);
if (factory.pushinCollector != null) {
factory.pushinCollector.tagAsMunged(sourceType, new CommonPrinter((methodDecl == null ? null : methodDecl.scope))
.printAnnotation(toAdd[0]).toString());
}
return true;
}
private Annotation[] retrieveAnnotationFromBinaryTypeBinding(DeclareAnnotation decA, ReferenceBinding declaringBinding) {
ReferenceType rt = (ReferenceType) factory.fromEclipse(declaringBinding);
ResolvedMember[] methods = rt.getDeclaredMethods();
ResolvedMember decaMethod = null;
String nameToLookFor = decA.getAnnotationMethod();
for (int i = 0; i < methods.length; i++) {
if (methods[i].getName().equals(nameToLookFor)) {
decaMethod = methods[i];
break;
}
}
if (decaMethod != null) {
AnnotationAJ[] axs = decaMethod.getAnnotations();
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
if (axs != null) {
Annotation[] toAdd = new Annotation[1];
toAdd[0] = createAnnotationFromBcelAnnotation(axs[0], decaMethod.getSourceLocation().getOffset(), factory);
return toAdd;
}
}
return null;
}
/**
* Transform an annotation from its AJ form to an eclipse form. We *DONT* care about the values of the annotation. that is
* because it is only being stuck on a type during type completion to allow for other constructs (decps, decas) that might be
* looking for it - when the class actually gets to disk it wont have this new annotation on it and during weave time we will do
* the right thing copying across values too.
*/
private static Annotation createAnnotationFromBcelAnnotation(AnnotationAJ annX, int pos, EclipseFactory factory) {
String name = annX.getTypeName();
TypeBinding tb = factory.makeTypeBinding(annX.getType());
char[][] typeName = CharOperation.splitOn('.', name.replace('$', '.').toCharArray());
long[] positions = new long[typeName.length];
for (int i = 0; i < positions.length; i++) {
positions[i] = pos;
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
}
TypeReference annType = new QualifiedTypeReference(typeName, positions);
NormalAnnotation ann = new NormalAnnotation(annType, pos);
ann.resolvedType = tb;
return ann;
}
/**
* Create a copy of an annotation, not deep but deep enough so we don't copy across fields that will get us into trouble like
* 'recipient'
*/
private static Annotation createAnnotationCopy(Annotation ann) {
NormalAnnotation ann2 = new NormalAnnotation(ann.type, ann.sourceStart);
ann2.memberValuePairs = ann.memberValuePairs();
ann2.resolvedType = ann.resolvedType;
ann2.bits = ann.bits;
return ann2;
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
}
private boolean isAnnotationTargettingSomethingOtherThanAnnotationOrNormal(long abits) {
return (abits & (TagBits.AnnotationForAnnotationType | TagBits.AnnotationForType)) == 0;
}
private void reportDeclareParentsMessage(WeaveMessage.WeaveMessageKind wmk, SourceTypeBinding sourceType, ResolvedType parent) {
if (!factory.getWorld().getMessageHandler().isIgnoring(IMessage.WEAVEINFO)) {
String filename = new String(sourceType.getFileName());
int takefrom = filename.lastIndexOf('/');
if (takefrom == -1) {
takefrom = filename.lastIndexOf('\\');
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
}
filename = filename.substring(takefrom + 1);
factory.getWorld()
.getMessageHandler()
.handleMessage(
WeaveMessage.constructWeavingMessage(wmk,
new String[] { CharOperation.toString(sourceType.compoundName), filename,
parent.getClassName(),
getShortname(parent.getSourceLocation().getSourceFile().getPath()) }));
}
}
private String getShortname(String path) {
int takefrom = path.lastIndexOf('/');
if (takefrom == -1) {
takefrom = path.lastIndexOf('\\');
}
return path.substring(takefrom + 1);
}
private void addParent(SourceTypeBinding sourceType, ResolvedType parent) {
ReferenceBinding parentBinding = (ReferenceBinding) factory.makeTypeBinding(parent);
if (parentBinding == null) {
return;
}
sourceType.rememberTypeHierarchy();
if (parentBinding.isClass()) {
sourceType.superclass = parentBinding;
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
} else {
ReferenceBinding[] oldI = sourceType.superInterfaces;
ReferenceBinding[] newI;
if (oldI == null) {
newI = new ReferenceBinding[1];
newI[0] = parentBinding;
} else {
int n = oldI.length;
newI = new ReferenceBinding[n + 1];
System.arraycopy(oldI, 0, newI, 0, n);
newI[n] = parentBinding;
}
sourceType.superInterfaces = newI;
}
if (sourceType instanceof BinaryTypeBinding) {
ResolvedType onType = factory.fromEclipse(sourceType);
ReferenceType rt = (ReferenceType) onType;
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
ReferenceTypeDelegate rtd = rt.getDelegate();
if (rtd instanceof BcelObjectType) {
rt.addParent(parent);
}
}
}
public void warnOnAddedInterface(ResolvedType type, ResolvedType parent) {
World world = factory.getWorld();
ResolvedType serializable = world.getCoreType(UnresolvedType.SERIALIZABLE);
if (serializable.isAssignableFrom(type) && !serializable.isAssignableFrom(parent)
&& !LazyClassGen.hasSerialVersionUIDField(type)) {
world.getLint().needsSerialVersionUIDField.signal(new String[] { type.getName().toString(),
"added interface " + parent.getName().toString() }, null, null);
}
}
private final List pendingTypesToFinish = new ArrayList();
boolean inBinaryTypeCreationAndWeaving = false;
boolean processingTheQueue = false;
public BinaryTypeBinding createBinaryTypeFrom(IBinaryType binaryType, PackageBinding packageBinding,
boolean needFieldsAndMethods, AccessRestriction accessRestriction) {
if (inBinaryTypeCreationAndWeaving) {
BinaryTypeBinding ret = super.createBinaryTypeFrom(binaryType, packageBinding, needFieldsAndMethods, accessRestriction);
pendingTypesToFinish.add(ret);
return ret;
}
inBinaryTypeCreationAndWeaving = true;
try {
BinaryTypeBinding ret = super.createBinaryTypeFrom(binaryType, packageBinding, needFieldsAndMethods, accessRestriction);
factory.getWorld().validateType(factory.fromBinding(ret));
|
322,832 |
Bug 322832 early field resolution leading to problems for ITDs when declare parents in use
|
I have a type that is being used where a generic is being expected. That generic specifies an upper bound. The type only obeys the upper bound once a declare parents has applied to it. I have an intertype declaration (a field). When the ITD is applied we do some work to see if it clashes with existing fields. This causes existing fields to be resolved. If this resolution triggers a bounds check for the declare parents affected type before the declare parents has applied, a problem will be raised. Basically if the target of the declare is processed before the intertype then we are ok, but that is luck based. We should do the declare parents first (and declare annotation) and then do intertype declarations (since they may trigger this extra resolution).
|
resolved fixed
|
16adee6
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-16T19:52:25Z | 2010-08-16T20:20:00Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
|
weaveInterTypeDeclarations(ret);
return ret;
} finally {
inBinaryTypeCreationAndWeaving = false;
if (pendingTypesToFinish.size() > 0) {
processingTheQueue = true;
while (!pendingTypesToFinish.isEmpty()) {
BinaryTypeBinding nextVictim = (BinaryTypeBinding) pendingTypesToFinish.remove(0);
weaveInterTypeDeclarations(nextVictim);
}
processingTheQueue = false;
}
}
}
/**
* Callback driven when the compiler detects an anonymous type during block resolution. We need to add it to the weaver so that
* we don't trip up later.
*
* @param aBinding
*/
public void anonymousTypeBindingCreated(LocalTypeBinding aBinding) {
factory.addSourceTypeBinding(aBinding, null);
}
}
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
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)
*******************************************************************/
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
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.Collections;
import java.util.Comparator;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.aspectj.ajde.core.ICompilerConfiguration;
import org.aspectj.ajde.core.TestOutputLocationManager;
import org.aspectj.ajde.core.internal.AjdeCoreBuildManager;
import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
import org.aspectj.ajdt.internal.core.builder.AjBuildManager;
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.IHierarchy;
import org.aspectj.asm.IProgramElement;
import org.aspectj.asm.IRelationship;
import org.aspectj.asm.IRelationshipMap;
import org.aspectj.asm.internal.ProgramElement;
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
import org.aspectj.asm.internal.Relationship;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.Message;
import org.aspectj.tools.ajc.Ajc;
import org.aspectj.util.FileUtil;
import org.aspectj.weaver.ResolvedMember;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.World;
/**
* 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 {
public void testIncrementalITDInners3() throws Exception {
AjdeInteractionTestbed.VERBOSE = true;
String p = "prInner3";
initialiseProject(p);
build(p);
checkWasFullBuild();
alter(p, "inc1");
build(p);
checkWasntFullBuild();
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
alter(p, "inc2");
build(p);
checkWasntFullBuild();
alter(p, "inc3");
build(p);
checkWasntFullBuild();
}
public void testIncrementalITDInners2() throws Exception {
String p = "prInner2";
initialiseProject(p);
build(p);
checkWasFullBuild();
alter(p, "inc1");
build(p);
checkWasntFullBuild();
alter(p, "inc2");
build(p);
checkWasntFullBuild();
alter(p, "inc3");
build(p);
checkWasntFullBuild();
}
public void testIncrementalITDInners() throws Exception {
String p = "prInner";
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
initialiseProject(p);
build(p);
checkWasFullBuild();
alter(p, "inc1");
build(p);
checkWasntFullBuild();
}
/*
* public void testIncrementalAspectWhitespace() throws Exception { AjdeInteractionTestbed.VERBOSE = true; String p = "xxx";
* initialiseProject(p); configureNonStandardCompileOptions(p, "-showWeaveInfo"); configureShowWeaveInfoMessages(p, true);
* build(p);
*
* List weaveMessages = getWeavingMessages(p); if (weaveMessages.size() != 0) { for (Iterator iterator =
* weaveMessages.iterator(); iterator.hasNext();) { Object object = iterator.next(); System.out.println(object); } }
* checkWasFullBuild(); assertNoErrors(p); alter(p, "inc1"); build(p); checkWasntFullBuild(); assertNoErrors(p); }
*/
public void testIncrementalGenericItds_pr280676() throws Exception {
String p = "pr280676";
initialiseProject(p);
build(p);
checkWasFullBuild();
assertNoErrors(p);
alter(p, "inc1");
build(p);
checkWasFullBuild();
assertNoErrors(p);
alter(p, "inc2");
build(p);
checkWasFullBuild();
assertNoErrors(p);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
alter(p, "inc3");
build(p);
checkWasFullBuild();
assertNoErrors(p);
}
public void testIncrementalGenericItds_pr280676_2() throws Exception {
String p = "pr280676_2";
initialiseProject(p);
build(p);
checkWasFullBuild();
assertNoErrors(p);
alter(p, "inc1");
build(p);
List errors = getErrorMessages(p);
assertEquals(5, errors.size());
}
public void testAdviceHandles_pr284771() throws Exception {
String p = "pr284771";
initialiseProject(p);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
build(p);
printModel(p);
IRelationshipMap irm = getModelFor(p).getRelationshipMap();
List<IRelationship> rels = irm.get("=pr284771<test*AspectTrace.aj'AspectTrace&before");
assertNotNull(rels);
assertEquals(2, ((Relationship) rels.get(0)).getTargets().size());
rels = irm.get("=pr284771<test*AspectTrace.aj'AspectTrace&before!2");
assertNotNull(rels);
assertEquals(2, ((Relationship) rels.get(0)).getTargets().size());
}
/**
* Test that the declare parents in the super aspect gets a relationship from the type declaring it.
*/
public void testAspectInheritance_322446() throws Exception {
String p ="pr322446";
initialiseProject(p);
build(p);
IRelationshipMap irm = getModelFor(p).getRelationshipMap();
List<IRelationship> rels = irm.get("=pr322446<{AbstractAspect.java'AbstractAspect`declare parents");
assertNotNull(rels);
}
public void testAspectInheritance_322446_2() throws Exception {
String p ="pr322446_2";
initialiseProject(p);
build(p);
IProgramElement thisAspectNode = getModelFor(p).getHierarchy().findElementForType("","Sub");
assertEquals("{Code=[I]}",thisAspectNode.getDeclareParentsMap().toString());
}
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testAspectInheritance_322664() throws Exception {
AjdeInteractionTestbed.VERBOSE=true;
String p ="pr322446_3";
initialiseProject(p);
build(p);
assertNoErrors(p);
alter(p,"inc1");
build(p);
List<IMessage> errors = getErrorMessages(p);
assertTrue(errors!=null && errors.size()>0);
alter(p,"inc2");
build(p);
assertNoErrors(p);
}
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testDecAnnoState_pr286539() throws Exception {
String p = "pr286539";
initialiseProject(p);
build(p);
printModel(p);
IProgramElement decpPE = getModelFor(p).getHierarchy().findElementForHandle(
"=pr286539<p.q.r{Aspect.java'Asp`declare parents");
assertNotNull(decpPE);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
String s = ((decpPE.getParentTypes()).get(0));
assertEquals("p.q.r.Int", s);
decpPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java'Asp`declare parents!2");
assertNotNull(decpPE);
s = ((decpPE.getParentTypes()).get(0));
assertEquals("p.q.r.Int", s);
IProgramElement decaPE = getModelFor(p).getHierarchy().findElementForHandle(
"=pr286539<p.q.r{Aspect.java'Asp`declare \\@type");
assertNotNull(decaPE);
assertEquals("p.q.r.Foo", decaPE.getAnnotationType());
decaPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java'Asp`declare \\@type!2");
assertNotNull(decaPE);
assertEquals("p.q.r.Goo", decaPE.getAnnotationType());
decaPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java'Asp`declare \\@field");
assertNotNull(decaPE);
assertEquals("p.q.r.Foo", decaPE.getAnnotationType());
decaPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java'Asp`declare \\@method");
assertNotNull(decaPE);
assertEquals("p.q.r.Foo", decaPE.getAnnotationType());
decaPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java'Asp`declare \\@constructor");
assertNotNull(decaPE);
assertEquals("p.q.r.Foo", decaPE.getAnnotationType());
}
public void testQualifiedInnerTypeRefs_269082() throws Exception {
String p = "pr269082";
initialiseProject(p);
build(p);
printModel(p);
IProgramElement root = getModelFor(p).getHierarchy().getRoot();
IProgramElement ipe = findElementAtLine(root, 7);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
assertEquals("=pr269082<a{ClassUsingInner.java[ClassUsingInner~foo~QMyInner;~QObject;~QString;", ipe.getHandleIdentifier());
ipe = findElementAtLine(root, 9);
assertEquals("=pr269082<a{ClassUsingInner.java[ClassUsingInner~goo~QClassUsingInner.MyInner;~QObject;~QString;", ipe
.getHandleIdentifier());
ipe = findElementAtLine(root, 11);
assertEquals("=pr269082<a{ClassUsingInner.java[ClassUsingInner~hoo~Qa.ClassUsingInner.MyInner;~QObject;~QString;", ipe
.getHandleIdentifier());
}
public void testIncrementalFqItds_280380() throws Exception {
String p = "pr280380";
initialiseProject(p);
build(p);
alter(p, "inc1");
build(p);
assertNoErrors(p);
}
public void testIncrementalAdvisingItdJoinpointsAccessingPrivFields_307120() throws Exception {
String p = "pr307120";
initialiseProject(p);
build(p);
alter(p, "inc1");
assertEquals(4, getRelationshipCount(p));
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
build(p);
assertNoErrors(p);
assertEquals(4, getRelationshipCount(p));
}
public void testIncrementalAdvisingItdJoinpointsAccessingPrivFields_307120_pipelineOff() throws Exception {
String p = "pr307120";
initialiseProject(p);
configureNonStandardCompileOptions(p, "-Xset:pipelineCompilation=false");
build(p);
alter(p, "inc1");
assertEquals(4, getRelationshipCount(p));
build(p);
assertNoErrors(p);
assertEquals(4, getRelationshipCount(p));
}
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testIncrementalAdvisingItdJoinpointsAccessingPrivFields_307120_2_pipelineOff() throws Exception {
String p = "pr307120_3";
initialiseProject(p);
configureNonStandardCompileOptions(p, "-Xset:pipelineCompilation=false");
build(p);
assertNoErrors(p);
assertEquals(4, getRelationshipCount(p));
alter(p, "inc1");
build(p);
assertEquals(4, getRelationshipCount(p));
assertNoErrors(p);
}
public void testIncrementalAdvisingItdJoinpointsAccessingPrivFields_307120_2() throws Exception {
String p = "pr307120_2";
initialiseProject(p);
build(p);
assertNoErrors(p);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
assertEquals(8, getRelationshipCount(p));
alter(p, "inc1");
build(p);
assertEquals(8, getRelationshipCount(p));
assertNoErrors(p);
}
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testIncrementalFqItds_280380_2() throws Exception {
String p = "pr280380";
initialiseProject(p);
build(p);
assertEquals(4, getModelFor(p).getRelationshipMap().getEntries().size());
alter(p, "inc2");
build(p);
assertNoErrors(p);
assertEquals(4, getModelFor(p).getRelationshipMap().getEntries().size());
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
public void testIncrementalFqItds_280380_3() throws Exception {
String p = "pr280380";
initialiseProject(p);
build(p);
assertEquals(4, getModelFor(p).getRelationshipMap().getEntries().size());
printModel(p);
assertNotNull(getModelFor(p).getRelationshipMap().get("=pr280380<g*AnAspect.aj'AnAspect,AClass.xxxx"));
alter(p, "inc2");
build(p);
assertNoErrors(p);
printModel(p);
assertEquals(4, getModelFor(p).getRelationshipMap().getEntries().size());
assertNotNull(getModelFor(p).getRelationshipMap().get("=pr280380<g*AnAspect.aj'AnAspect,AClass.xxxx"));
}
public void testIncrementalCtorItdHandle_280383() throws Exception {
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
String p = "pr280383";
initialiseProject(p);
build(p);
printModel(p);
IRelationshipMap irm = getModelFor(p).getRelationshipMap();
List rels = irm.get("=pr280383<f{AnAspect.java'AnAspect)f.AClass.f_AClass_new");
assertNotNull(rels);
}
public void testSimilarITDS() throws Exception {
String p = "pr283657";
initialiseProject(p);
build(p);
printModel(p);
IRelationshipMap irm = getModelFor(p).getRelationshipMap();
List<IRelationship> rels = irm.get("=pr283657<{Aspect.java'Aspect,Target.foo");
assertNotNull(rels);
rels = irm.get("=pr283657<{Aspect.java'Aspect)Target.foo!2");
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
assertNotNull(rels);
}
public void testIncrementalAnnotationMatched_276399() throws Exception {
String p = "pr276399";
initialiseProject(p);
addSourceFolderForSourceFile(p, getProjectRelativePath(p, "src/X.aj"), "src");
addSourceFolderForSourceFile(p, getProjectRelativePath(p, "src/C.java"), "src");
build(p);
IRelationshipMap irm = getModelFor(p).getRelationshipMap();
IRelationship ir = irm.get("=pr276399/src<*X.aj'X&after").get(0);
assertNotNull(ir);
alter(p, "inc1");
build(p);
printModel(p);
irm = getModelFor(p).getRelationshipMap();
List<IRelationship> rels = irm.get("=pr276399/src<*X.aj'X&after");
assertNull(rels);
}
public void testHandleCountDecA_pr278255() throws Exception {
String p = "pr278255";
initialiseProject(p);
build(p);
printModelAndRelationships(p);
IRelationshipMap irm = getModelFor(p).getRelationshipMap();
List<IRelationship> l = irm.get("=pr278255<{A.java'X`declare \\@type");
assertNotNull(l);
IRelationship ir = l.get(0);
assertNotNull(ir);
}
public void testIncrementalItdDefaultCtor() {
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
String p = "pr275032";
initialiseProject(p);
build(p);
assertEquals(0, getErrorMessages(p).size());
alter(p, "inc1");
build(p);
getErrorMessages(p);
assertEquals(4, getErrorMessages(p).size());
assertTrue("Was:" + getErrorMessages(p).get(0), getErrorMessages(p).get(0).toString().indexOf("conflicts") != -1);
}
public void testOutputLocationCallbacks2() {
String p = "pr268827_ol_res";
initialiseProject(p);
Map m = new HashMap();
m.put("a.txt", new File(getFile(p, "src/a.txt")));
configureResourceMap(p, m);
CustomOLM olm = new CustomOLM(getProjectRelativePath(p, ".").toString());
configureOutputLocationManager(p, olm);
build(p);
checkCompileWeaveCount(p, 2, 2);
assertEquals(3, olm.writeCount);
alter(p, "inc1");
build(p);
checkCompileWeaveCount(p, 3, 1);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
assertEquals(1, olm.removeCount);
}
public void testOutputLocationCallbacks() {
String p = "pr268827_ol";
initialiseProject(p);
CustomOLM olm = new CustomOLM(getProjectRelativePath(p, ".").toString());
configureOutputLocationManager(p, olm);
build(p);
checkCompileWeaveCount(p, 2, 3);
alter(p, "inc1");
build(p);
checkCompileWeaveCount(p, 1, 1);
assertEquals(1, olm.removeCount);
}
public void testOutputLocationCallbacksFileAdd() {
String p = "pr268827_ol2";
initialiseProject(p);
CustomOLM olm = new CustomOLM(getProjectRelativePath(p, ".").toString());
configureOutputLocationManager(p, olm);
build(p);
assertEquals(3, olm.writeCount);
olm.writeCount = 0;
checkCompileWeaveCount(p, 2, 3);
alter(p, "inc1");
build(p);
assertEquals(1, olm.writeCount);
checkCompileWeaveCount(p, 1, 1);
}
static class CustomOLM extends TestOutputLocationManager {
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public int writeCount = 0;
public int removeCount = 0;
public CustomOLM(String testProjectPath) {
super(testProjectPath);
}
@Override
public void reportFileWrite(String outputfile, int filetype) {
super.reportFileWrite(outputfile, filetype);
writeCount++;
System.out.println("Written " + outputfile);
}
@Override
public void reportFileRemove(String outputfile, int filetype) {
super.reportFileRemove(outputfile, filetype);
removeCount++;
System.out.println("Removed " + outputfile);
}
}
public void testBrokenCodeDeca_268611() {
String p = "pr268611";
initialiseProject(p);
build(p);
checkWasFullBuild();
assertEquals(1, getErrorMessages(p).size());
assertTrue(((Message) getErrorMessages(p).get(0)).getMessage().indexOf(
"Syntax error on token \")\", \"name pattern\" expected") != -1);
}
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testIncrementalMixin() {
String p = "mixin";
initialiseProject(p);
build(p);
checkWasFullBuild();
assertEquals(0, getErrorMessages(p).size());
alter(p, "inc1");
build(p);
checkWasntFullBuild();
assertEquals(0, getErrorMessages(p).size());
}
public void testUnusedPrivates_pr266420() {
String p = "pr266420";
initialiseProject(p);
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");
javaOptions.put("org.eclipse.jdt.core.compiler.problem.unusedPrivateMember", "warning");
configureJavaOptionsMap(p, javaOptions);
build(p);
checkWasFullBuild();
List warnings = getWarningMessages(p);
assertEquals(0, warnings.size());
alter(p, "inc1");
build(p);
checkWasntFullBuild();
warnings = getWarningMessages(p);
assertEquals(0, warnings.size());
}
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testExtendingITDAspectOnClasspath_PR298704() throws Exception {
String base = "pr298704_baseaspects";
String test = "pr298704_testaspects";
initialiseProject(base);
initialiseProject(test);
configureNewProjectDependency(test, base);
build(base);
build(test);
checkWasFullBuild();
assertNoErrors(test);
IRelationshipMap irm = getModelFor(test).getRelationshipMap();
assertEquals(7, irm.getEntries().size());
}
public void testPR265729() {
AjdeInteractionTestbed.VERBOSE = true;
String lib = "pr265729_lib";
initialiseProject(lib);
build(lib);
checkWasFullBuild();
String cli = "pr265729_client";
initialiseProject(cli);
configureAspectPath(cli, getProjectRelativePath(lib, "bin"));
build(cli);
checkWasFullBuild();
IProgramElement root = getModelFor(cli).getHierarchy().getRoot();
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
IRelationshipMap irm = getModelFor(cli).getRelationshipMap();
IRelationship ir = irm.get("=pr265729_client<be.cronos.aop{App.java[App").get(0);
String h1 = ir.getTargets().get(0);
String h2 = ir.getTargets().get(1);
if (!h1.endsWith("parents")) {
String h3 = h1;
h1 = h2;
h2 = h3;
}
assertEquals("=pr265729_client/binaries<be.cronos.aop.aspects(InterTypeAspect.class'InterTypeAspect`declare parents", h1);
assertEquals(
"=pr265729_client/binaries<be.cronos.aop.aspects(InterTypeAspect.class'InterTypeAspect)InterTypeAspectInterface.foo)I)QList;)QSerializable;",
h2);
IProgramElement binaryDecp = getModelFor(cli).getHierarchy().getElement(h1);
assertNotNull(binaryDecp);
IProgramElement binaryITDM = getModelFor(cli).getHierarchy().getElement(h2);
assertNotNull(binaryITDM);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
List ptypes = binaryITDM.getParameterTypes();
assertEquals("int", new String((char[]) ptypes.get(0)));
assertEquals("java.util.List", new String((char[]) ptypes.get(1)));
assertEquals("java.io.Serializable", new String((char[]) ptypes.get(2)));
assertEquals("java.lang.String", binaryITDM.getCorrespondingType(true));
}
public void testXmlConfiguredProject() {
AjdeInteractionTestbed.VERBOSE = true;
String p = "xmlone";
initialiseProject(p);
configureNonStandardCompileOptions(p, "-showWeaveInfo");
configureShowWeaveInfoMessages(p, true);
addXmlConfigFile(p, getProjectRelativePath(p, "p/aop.xml").toString());
build(p);
checkWasFullBuild();
List weaveMessages = getWeavingMessages(p);
if (weaveMessages.size() != 1) {
for (Iterator iterator = weaveMessages.iterator(); iterator.hasNext();) {
Object object = iterator.next();
System.out.println(object);
}
fail("Expected just one weave message. The aop.xml should have limited the weaving");
}
}
public void testDeclareParentsInModel() {
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
String p = "decps";
initialiseProject(p);
build(p);
IProgramElement decp = getModelFor(p).getHierarchy().findElementForHandle("=decps<a{A.java'A`declare parents");
List<String> ps = decp.getParentTypes();
assertNotNull(ps);
assertEquals(2, ps.size());
int count = 0;
for (Iterator<String> iterator = ps.iterator(); iterator.hasNext();) {
String type = iterator.next();
if (type.equals("java.io.Serializable")) {
count++;
}
if (type.equals("a.Goo")) {
count++;
}
}
assertEquals("Should have found the two types in: " + ps, 2, count);
}
public void testConstructorAdvice_pr261380() throws Exception {
String p = "261380";
initialiseProject(p);
build(p);
IRelationshipMap irm = getModelFor(p).getRelationshipMap();
IRelationship ir = irm.get("=261380<test{C.java'X&before").get(0);
List targets = ir.getTargets();
assertEquals(1, targets.size());
System.out.println(targets.get(0));
String handle = (String) targets.get(0);
assertEquals("Expected the handle for the code node inside the constructor decl",
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
"=261380<test{C.java[C~C?constructor-call(void test.C.<init>())", handle);
}
/*
* 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(getModelFor("P4"), "after full build where advice is applying");
alter("P4", "inc1");
build("P4");
checkWasntFullBuild();
Ajc.dumpAJDEStructureModel(getModelFor("P4"), "after inc build where first advised line is gone");
IProgramElement codeElement = findCode(checkForNode(getModelFor("P4"), "pack", "C", true));
IProgramElement advice = findAdvice(checkForNode(getModelFor("P4"), "pack", "A", true));
IRelationshipMap asmRelMap = getModelFor("P4").getRelationshipMap();
assertEquals("There should be two relationships in the relationship map", 2, asmRelMap.getEntries().size());
for (Iterator iter = asmRelMap.getEntries().iterator(); iter.hasNext();) {
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
String sourceOfRelationship = (String) iter.next();
IProgramElement ipe = getModelFor("P4").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 = getModelFor("P4").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);
} 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());
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
}
}
}
} finally {
}
}
public void testPr148285() {
String p = "PR148285_2";
initialiseProject(p);
build(p);
checkWasFullBuild();
alter(p, "inc1");
build(p);
checkWasntFullBuild();
List msgs = getErrorMessages(p);
assertEquals("error message should be 'The type C is already defined' ", "The type C is already defined", ((IMessage) msgs
.get(0)).getMessage());
alter("PR148285_2", "inc2");
build("PR148285_2");
checkWasntFullBuild();
msgs = getErrorMessages(p);
assertTrue("There should be no errors reported:\n" + getErrorMessages(p), msgs.isEmpty());
}
public void testIncrementalAndAnnotations() {
initialiseProject("Annos");
build("Annos");
checkWasFullBuild();
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
checkCompileWeaveCount("Annos", 4, 4);
AsmManager model = getModelFor("Annos");
assertEquals("Should be 3 relationships ", 3, model.getRelationshipMap().getEntries().size());
alter("Annos", "inc1");
build("Annos");
checkWasntFullBuild();
assertEquals("Should be no relationships ", 0, model.getRelationshipMap().getEntries().size());
checkCompileWeaveCount("Annos", 3, 3);
alter("Annos", "inc2");
build("Annos");
checkWasntFullBuild();
assertEquals("Should be 3 relationships ", 3, model.getRelationshipMap().getEntries().size());
checkCompileWeaveCount("Annos", 3, 3);
}
public void testITDFQNames_pr252702() {
String p = "itdfq";
AjdeInteractionTestbed.VERBOSE = true;
initialiseProject(p);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
build(p);
AsmManager model = getModelFor(p);
dumptree(model.getHierarchy().getRoot(), 0);
IProgramElement root = model.getHierarchy().getRoot();
ProgramElement theITD = (ProgramElement) findElementAtLine(root, 7);
Map<String, Object> m = theITD.kvpairs;
for (Iterator<String> iterator = m.keySet().iterator(); iterator.hasNext();) {
String type = iterator.next();
System.out.println(type + " = " + m.get(type));
}
assertEquals("a.b.c.B", theITD.getCorrespondingType(true));
List<char[]> ptypes = theITD.getParameterTypes();
for (Iterator<char[]> iterator = ptypes.iterator(); iterator.hasNext();) {
char[] object = iterator.next();
System.out.println("p = " + new String(object));
}
ProgramElement decp = (ProgramElement) findElementAtLine(root, 8);
m = decp.kvpairs;
for (Iterator<String> iterator = m.keySet().iterator(); iterator.hasNext();) {
String type = iterator.next();
System.out.println(type + " = " + m.get(type));
}
List<String> l = decp.getParentTypes();
assertEquals("java.io.Serializable", l.get(0));
ProgramElement ctorDecp = (ProgramElement) findElementAtLine(root, 16);
String ctordecphandle = ctorDecp.getHandleIdentifier();
assertEquals("=itdfq<a.b.c{A.java'XX)B.B_new)QString;", ctordecphandle);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
public void testBrokenHandles_pr247742() {
String p = "BrokenHandles";
initialiseProject(p);
build(p);
AsmManager model = getModelFor(p);
dumptree(model.getHierarchy().getRoot(), 0);
IProgramElement root = model.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 testNPEIncremental_pr262218() {
AjdeInteractionTestbed.VERBOSE = true;
String p = "pr262218";
initialiseProject(p);
build(p);
checkWasFullBuild();
alter(p, "inc1");
build(p);
checkWasntFullBuild();
List l = getCompilerErrorMessages(p);
assertEquals("Unexpected compiler error", 0, l.size());
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
public void testDeclareAnnotationNPE_298504() {
AjdeInteractionTestbed.VERBOSE = true;
String p = "pr298504";
initialiseProject(p);
build(p);
List l = getErrorMessages(p);
assertTrue(l.toString().indexOf("ManagedResource cannot be resolved to a type") != -1);
alter(p, "inc1");
build(p);
l = getCompilerErrorMessages(p);
assertTrue(l.toString().indexOf("NullPointerException") == -1);
l = getErrorMessages(p);
assertTrue(l.toString().indexOf("ManagedResource cannot be resolved to a type") != -1);
}
public void testIncrementalAnnoStyle_pr286341() {
AjdeInteractionTestbed.VERBOSE = true;
String base = "pr286341_base";
initialiseProject(base);
build(base);
checkWasFullBuild();
String p = "pr286341";
initialiseProject(p);
configureAspectPath(p, getProjectRelativePath(base, "bin"));
addClasspathEntry(p, getProjectRelativePath(base, "bin"));
build(p);
checkWasFullBuild();
assertNoErrors(p);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
alter(p, "inc1");
build(p);
checkWasntFullBuild();
assertNoErrors(p);
}
public void testImports_pr263487() {
String p2 = "importProb2";
initialiseProject(p2);
build(p2);
checkWasFullBuild();
String p = "importProb";
initialiseProject(p);
build(p);
configureAspectPath(p, getProjectRelativePath(p2, "bin"));
checkWasFullBuild();
build(p);
build(p);
build(p);
alter(p, "inc1");
addProjectSourceFileChanged(p, getProjectRelativePath(p, "src/p/Code.java"));
build(p);
checkWasntFullBuild();
List l = getCompilerErrorMessages(p);
assertEquals("Unexpected compiler error", 0, l.size());
}
public void testBuildingBrokenCode_pr263323() {
AjdeInteractionTestbed.VERBOSE = true;
String p = "brokenCode";
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
initialiseProject(p);
build(p);
checkWasFullBuild();
alter(p, "inc1");
build(p);
checkWasntFullBuild();
alter(p, "inc2");
build(p);
checkWasntFullBuild();
List l = getCompilerErrorMessages(p);
assertEquals("Unexpected compiler error", 0, l.size());
}
/*
* public void testNPEGenericCtor_pr260944() { AjdeInteractionTestbed.VERBOSE = true; String p = "pr260944";
* initialiseProject(p); build(p); checkWasFullBuild(); alter(p, "inc1"); build(p); checkWasntFullBuild(); List l =
* getCompilerErrorMessages(p); assertEquals("Unexpected compiler error", 0, l.size()); }
*/
public void testItdProb() {
AjdeInteractionTestbed.VERBOSE = true;
String p = "itdprob";
initialiseProject(p);
build(p);
checkWasFullBuild();
alter(p, "inc1");
build(p);
checkWasntFullBuild();
List l = getCompilerErrorMessages(p);
assertEquals("Unexpected compiler error", 0, l.size());
}
/*
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
* public void testGenericITD_pr262257() throws IOException { String p = "pr262257"; initialiseProject(p); build(p);
* checkWasFullBuild();
*
* dumptree(getModelFor(p).getHierarchy().getRoot(), 0); PrintWriter pw = new PrintWriter(System.out);
* getModelFor(p).dumprels(pw); pw.flush(); }
*/
public void testAnnotations_pr262154() {
String p = "pr262154";
initialiseProject(p);
build(p);
checkWasFullBuild();
alter(p, "inc1");
build(p);
List l = getCompilerErrorMessages(p);
assertEquals("Unexpected compiler error", 0, l.size());
}
public void testAnnotations_pr255555() {
String p = "pr255555";
initialiseProject(p);
build(p);
checkCompileWeaveCount(p, 2, 1);
}
public void testSpacewarHandles() {
String p = "Simpler";
initialiseProject(p);
build(p);
dumptree(getModelFor(p).getHierarchy().getRoot(), 0);
}
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
/**
* Test what is in the model for package declarations and import statements. Package Declaration nodes are new in AspectJ 1.6.4.
* Import statements are contained with an 'import references' node.
*/
public void testImportHandles() {
String p = "Imports";
initialiseProject(p);
build(p);
IProgramElement root = getModelFor(p).getHierarchy().getRoot();
IProgramElement ipe = findElementAtLine(root, 1);
ipe = ipe.getChildren().get(0);
System.out.println(ipe.getHandleIdentifier() + " " + ipe.getKind());
assertEquals(IProgramElement.Kind.PACKAGE_DECLARATION, ipe.getKind());
assertEquals("=Imports<p.q*Example.aj%p.q", ipe.getHandleIdentifier());
assertEquals("package p.q;", ipe.getSourceSignature());
assertEquals(ipe.getSourceLocation().getOffset(), 8);
ipe = findElementAtLine(root, 3);
ipe = ipe.getParent();
System.out.println(ipe.getHandleIdentifier() + " " + ipe.getKind());
dumptree(getModelFor(p).getHierarchy().getRoot(), 0);
assertEquals("=Imports<p.q*Example.aj#", ipe.getHandleIdentifier());
}
public void testAdvisingCallJoinpointsInITDS_pr253067() {
String p = "pr253067";
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
initialiseProject(p);
build(p);
IProgramElement root = getModelFor(p).getHierarchy().getRoot();
IProgramElement code = findElementAtLine(root, 5);
assertEquals("=pr253067<aa*AdvisesC.aj'AdvisesC)C.nothing?method-call(int aa.C.nothing())", code.getHandleIdentifier());
}
public void testHandles_DeclareAnno_pr249216_c9() {
String p = "pr249216";
initialiseProject(p);
build(p);
IProgramElement root = getModelFor(p).getHierarchy().getRoot();
IProgramElement code = findElementAtLine(root, 4);
assertEquals("=pr249216<{Deca.java'X`declare \\@type", code.getHandleIdentifier());
}
public void testNullDelegateBrokenCode_pr251940() {
String p = "pr251940";
initialiseProject(p);
build(p);
checkForError(p, "The type F must implement the inherited");
}
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testBeanExample() throws Exception {
String p = "BeanExample";
initialiseProject(p);
build(p);
dumptree(getModelFor(p).getHierarchy().getRoot(), 0);
PrintWriter pw = new PrintWriter(System.out);
getModelFor(p).dumprels(pw);
pw.flush();
}
private void checkIfContainsFile(Set s, String filename, boolean shouldBeFound) {
StringBuffer sb = new StringBuffer("Set of files\n");
for (Iterator iterator = s.iterator(); iterator.hasNext();) {
Object object = iterator.next();
sb.append(object).append("\n");
}
for (Iterator iterator = s.iterator(); iterator.hasNext();) {
File fname = (File) iterator.next();
if (fname.getName().endsWith(filename)) {
if (!shouldBeFound) {
System.out.println(sb.toString());
fail("Unexpectedly found file " + filename);
} else {
return;
}
}
}
if (shouldBeFound) {
System.out.println(sb.toString());
fail("Did not find filename " + filename);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
}
public void testITDIncremental_pr192877() {
String p = "PR192877";
initialiseProject(p);
build(p);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
checkWasFullBuild();
alter(p, "inc1");
build(p);
checkWasntFullBuild();
}
public void testIncrementalBuildsWithItds_pr259528() {
String p = "pr259528";
AjdeInteractionTestbed.VERBOSE = true;
initialiseProject(p);
build(p);
checkWasFullBuild();
alter(p, "inc1");
build(p);
checkWasntFullBuild();
}
public void testAdviceHandlesAreJDTCompatible() {
String p = "AdviceHandles";
initialiseProject(p);
addSourceFolderForSourceFile(p, getProjectRelativePath(p, "src/Handles.aj"), "src");
build(p);
IProgramElement root = getModelFor(p).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);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
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)
.getHandleIdentifier());
assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles~c~QString;[!2", findElementAtLine(root, 67)
.getHandleIdentifier());
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
private IProgramElement findFile(IProgramElement whereToLook, String filesubstring) {
if (whereToLook.getSourceLocation() != null && whereToLook.getKind().equals(IProgramElement.Kind.FILE_ASPECTJ)
&& whereToLook.getSourceLocation().getSourceFile().toString().indexOf(filesubstring) != -1) {
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
return whereToLook;
}
List kids = whereToLook.getChildren();
for (Iterator iterator = kids.iterator(); iterator.hasNext();) {
IProgramElement object = (IProgramElement) iterator.next();
if (object.getSourceLocation() != null && object.getKind().equals(IProgramElement.Kind.FILE_ASPECTJ)
&& object.getSourceLocation().getSourceFile().toString().indexOf(filesubstring) != -1) {
return whereToLook;
}
IProgramElement gotSomething = findFile(object, filesubstring);
if (gotSomething != null) {
return gotSomething;
}
}
return null;
}
private IProgramElement findElementAtLine(IProgramElement whereToLook, int line) {
if (whereToLook == null) {
return null;
}
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);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
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 = getModelFor("MultiSource").getHierarchy().findElementForHandle("=MultiSource/src1");
IProgramElement CodeOneClass = getModelFor("MultiSource").getHierarchy().findElementForHandle(
"=MultiSource/src1{CodeOne.java[CodeOne");
IProgramElement srcTwoPackage = getModelFor("MultiSource").getHierarchy().findElementForHandle("=MultiSource/src2<pkg");
IProgramElement srcThreePackage = getModelFor("MultiSource").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");
}
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
public void testModelWithMultipleSourceFolders2() {
initialiseProject("MultiSource");
addSourceFolderForSourceFile("MultiSource", getProjectRelativePath("MultiSource", "src1/CodeOne.java"), "src/java/main");
addSourceFolderForSourceFile("MultiSource", getProjectRelativePath("MultiSource", "src2/CodeTwo.java"), "src/java/main");
addSourceFolderForSourceFile("MultiSource", getProjectRelativePath("MultiSource", "src3/pkg/CodeThree.java"),
"src/java/tests");
build("MultiSource");
IProgramElement srcOne = getModelFor("MultiSource").getHierarchy().findElementForHandleOrCreate(
"=MultiSource/src\\/java\\/main", false);
IProgramElement CodeOneClass = getModelFor("MultiSource").getHierarchy().findElementForHandle(
"=MultiSource/src\\/java\\/main{CodeOne.java[CodeOne");
IProgramElement srcTwoPackage = getModelFor("MultiSource").getHierarchy().findElementForHandle(
"=MultiSource/src\\/java\\/tests<pkg");
IProgramElement srcThreePackage = getModelFor("MultiSource").getHierarchy().findElementForHandle(
"=MultiSource/src\\/java\\/testssrc3<pkg");
assertNotNull(srcOne);
assertNotNull(CodeOneClass);
assertNotNull(srcTwoPackage);
assertNotNull(srcThreePackage);
if (srcTwoPackage.equals(srcThreePackage)) {
throw new RuntimeException(
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
"Should not have found these package nodes to be the same, they are in different source folders");
}
}
public void testIncrementalItdsWithMultipleAspects_pr173729() {
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");
}
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testAspectPath_pr242797_c46() {
String bug = "pr242797_1";
String bug2 = "pr242797_2";
initialiseProject(bug);
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);
dumptree(getModelFor(bug2).getHierarchy().getRoot(), 0);
PrintWriter pw = new PrintWriter(System.out);
getModelFor(bug2).dumprels(pw);
pw.flush();
IProgramElement root = getModelFor(bug2).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());
}
public void testAspectPath_pr274558() throws Exception {
String base = "bug274558depending";
String depending = "bug274558base";
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
initialiseProject(base);
initialiseProject(depending);
configureAspectPath(depending, getProjectRelativePath(base, "bin"));
build(base);
build(depending);
printModel(depending);
IProgramElement root = getModelFor(depending).getHierarchy().getRoot();
assertEquals("=bug274558base/binaries<r(DeclaresITD.class'DeclaresITD,InterfaceForITD.x", findElementAtLine(root, 4)
.getHandleIdentifier());
}
public void testAspectPath_pr265693() throws IOException {
String bug = "AspectPath3";
String bug2 = "AspectPath4";
addSourceFolderForSourceFile(bug2, getProjectRelativePath(bug2, "src/C.java"), "src");
initialiseProject(bug);
initialiseProject(bug2);
configureAspectPath(bug2, getProjectRelativePath(bug, "bin"));
build(bug);
build(bug2);
IProgramElement root = getModelFor(bug2).getHierarchy().getRoot();
IProgramElement binariesNode = getChild(root, "binaries");
assertNotNull(binariesNode);
IProgramElement packageNode = binariesNode.getChildren().get(0);
assertEquals("a.b.c", packageNode.getName());
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
IProgramElement fileNode = packageNode.getChildren().get(0);
assertEquals(IProgramElement.Kind.FILE, fileNode.getKind());
}
private IProgramElement getChild(IProgramElement start, String name) {
if (start.getName().equals(name)) {
return start;
}
List kids = start.getChildren();
if (kids != null) {
for (int i = 0; i < kids.size(); i++) {
IProgramElement found = getChild((IProgramElement) kids.get(i), name);
if (found != null) {
return found;
}
}
}
return null;
}
public void testHandleQualification_pr265993() throws IOException {
String p = "pr265993";
initialiseProject(p);
build(p);
IProgramElement root = getModelFor(p).getHierarchy().getRoot();
assertEquals("=pr265993<{A.java[A~m~QString;~Qjava.lang.String;", findElementAtLine(root, 3).getHandleIdentifier());
assertEquals("=pr265993<{A.java[A~m2~QList;", findElementAtLine(root, 5).getHandleIdentifier());
assertEquals("=pr265993<{A.java[A~m3~Qjava.util.ArrayList;", findElementAtLine(root, 6).getHandleIdentifier());
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
assertEquals("=pr265993<{A.java[A~m4~QMap\\<Qjava.lang.String;QList;>;", findElementAtLine(root, 8).getHandleIdentifier());
assertEquals("=pr265993<{A.java[A~m5~Qjava.util.Map\\<Qjava.lang.String;QList;>;", findElementAtLine(root, 9)
.getHandleIdentifier());
assertEquals("=pr265993<{A.java[A~m6~QMap\\<\\[IQList;>;", findElementAtLine(root, 10).getHandleIdentifier());
assertEquals("=pr265993<{A.java[A~m7~\\[I", findElementAtLine(root, 11).getHandleIdentifier());
assertEquals("=pr265993<{A.java[A~m8~\\[Qjava.lang.String;", findElementAtLine(root, 12).getHandleIdentifier());
assertEquals("=pr265993<{A.java[A~m9~\\[QString;", findElementAtLine(root, 13).getHandleIdentifier());
assertEquals("=pr265993<{A.java[A~m10~\\[\\[QList\\<QString;>;", findElementAtLine(root, 14).getHandleIdentifier());
assertEquals("=pr265993<{A.java[A~m11~Qjava.util.List\\<QT;>;", findElementAtLine(root, 15).getHandleIdentifier());
assertEquals("=pr265993<{A.java[A~m12~\\[QT;", findElementAtLine(root, 16).getHandleIdentifier());
assertEquals("=pr265993<{A.java[A~m13~QClass\\<QT;>;~QObject;~QString;", findElementAtLine(root, 17).getHandleIdentifier());
}
public void testHandlesForAnnotationStyle_pr269286() throws IOException {
String p = "pr269286";
initialiseProject(p);
build(p);
IProgramElement root = getModelFor(p).getHierarchy().getRoot();
dumptree(getModelFor(p).getHierarchy().getRoot(), 0);
PrintWriter pw = new PrintWriter(System.out);
getModelFor(p).dumprels(pw);
pw.flush();
assertEquals("=pr269286<{Logger.java[Logger", findElementAtLine(root, 4).getHandleIdentifier());
assertEquals("=pr269286<{Logger.java[Logger~boo", findElementAtLine(root, 7).getHandleIdentifier());
assertEquals("=pr269286<{Logger.java[Logger~aoo", findElementAtLine(root, 11).getHandleIdentifier());
assertEquals("=pr269286<{Logger.java[Logger~aroo", findElementAtLine(root, 15).getHandleIdentifier());
assertEquals("=pr269286<{Logger.java[Logger\"ooo", findElementAtLine(root, 20).getHandleIdentifier());
assertEquals("=pr269286<{Logger.java[Logger^message", findElementAtLine(root, 24).getHandleIdentifier());
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
assertEquals("=pr269286<{Logger.java[Logger^message2", findElementAtLine(root, 27).getHandleIdentifier());
}
public void testHandleCountersForAdvice() throws IOException {
String p = "prx";
initialiseProject(p);
build(p);
IProgramElement root = getModelFor(p).getHierarchy().getRoot();
IProgramElement ff = findFile(root, "ProcessAspect.aj");
assertEquals("=prx<com.kronos.aspects*ProcessAspect.aj'ProcessAspect&after&QMyProcessor;", findElementAtLine(root, 22)
.getHandleIdentifier());
assertEquals("=prx<com.kronos.aspects*ProcessAspect.aj'ProcessAspect&after&QMyProcessor;!2", findElementAtLine(root, 68)
.getHandleIdentifier());
}
/**
* A change is made to an aspect on the aspectpath (staticinitialization() advice is added) for another project.
* <p>
* Managing the aspectpath is hard. We want to do a minimal build of this project which means recognizing what kind of changes
* have occurred on the aspectpath. Was it a regular class or an aspect? Was it a structural change to that aspect?
* <p>
* The filenames for .class files created that contain aspects is stored in the AjState.aspectClassFiles field. When a change is
* detected we can see who was managing the location where the change occurred and ask them if the .class file contained an
* aspect. Right now a change detected like this will cause a full build. We might improve the detection logic here but it isn't
* trivial:
* <ul>
* <li>Around advice is inlined. Changing the body of an around advice would not normally be thought of as a structural change
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
* (as it does not change the signature of the class) but due to inlining it is a change we would need to pay attention to as it
* will affect types previously woven with that advice.
* <li>Annotation style aspects include pointcuts in strings. Changes to these are considered non-structural but clearly they do
* affect what might be woven.
* </ul>
*/
public void testAspectPath_pr249212_c1() throws IOException {
String p1 = "AspectPathOne";
String p2 = "AspectPathTwo";
addSourceFolderForSourceFile(p2, getProjectRelativePath(p2, "src/C.java"), "src");
initialiseProject(p1);
initialiseProject(p2);
configureAspectPath(p2, getProjectRelativePath(p1, "bin"));
build(p1);
build(p2);
alter(p1, "inc1");
build(p1);
checkWasFullBuild();
Set s = getModelFor(p1).getModelChangesOnLastBuild();
assertTrue("Should be empty as was full build:" + s, s.isEmpty());
addClasspathEntryChanged(p2, getProjectRelativePath(p1, "bin").toString());
configureAspectPath(p2, getProjectRelativePath(p1, "bin"));
build(p2);
checkWasFullBuild();
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
assertTrue("Should be empty as was full build:" + s, s.isEmpty());
}
/**
* 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
*/
/*
* 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 =
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
* "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() {
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");
alter("P1", "inc2");
build("P1");
long timeTakenForFullBuildAndWeave = getTimeTakenForBuild("P1");
checkWasFullBuild();
checkCompileWeaveCount("P1", 5, 3);
build("P1");
long timeTakenForSimpleIncBuild = getTimeTakenForBuild("P1");
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
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() {
initialiseProject("pr240360");
build("pr240360");
checkWasFullBuild();
checkCompileWeaveCount("pr240360", 5, 4);
assertTrue("There should be an error:\n" + getErrorMessages("pr240360"), !getErrorMessages("pr240360").isEmpty());
Set s = getModelFor("pr240360").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();
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
checkCompileWeaveCount("pr240360", 0, 0);
assertEquals(relmapLength, getModelFor("pr240360").getRelationshipMap().getEntries().size());
alter("pr240360", "inc1");
build("pr240360");
checkWasntFullBuild();
checkCompileWeaveCount("pr240360", 1, 0);
assertEquals(relmapLength, getModelFor("pr240360").getRelationshipMap().getEntries().size());
alter("pr240360", "inc2");
build("pr240360");
checkWasFullBuild();
checkCompileWeaveCount("pr240360", 6, 4);
assertEquals(relmapLength, getModelFor("pr240360").getRelationshipMap().getEntries().size());
}
public void testBrokenCodeCompilation() {
initialiseProject("pr102733_1");
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());
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
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());
}
public void testRefactoring_pr148285() {
initialiseProject("PR148285");
build("PR148285");
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");
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
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());
}
/**
* This test is verifying the behaviour of the code that iterates through the type hierarchy for some type. There are two ways
* to do it - an approach that grabs all the information up front or an approach that works through iterators and only processes
* as much data as necessary to satisfy the caller. The latter approach could be much faster - especially if the matching
* process typically looks for a method in the declaring type.
*/
public void xtestOptimizedMemberLookup() {
String p = "oml";
initialiseProject(p);
build(p);
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
AjdeCoreBuildManager buildManager = getCompilerForProjectWithName(p).getBuildManager();
AjBuildManager ajBuildManager = buildManager.getAjBuildManager();
World w = ajBuildManager.getWorld();
checkType(w, "com.foo.A");
checkType(w, "com.foo.B");
checkType(w, "com.foo.C");
checkType(w, "com.foo.CC");
checkType(w, "com.foo.CCC");
checkType(w, "com.foo.CCC");
checkType(w, "GenericMethodInterface");
checkType(w, "GenericInterfaceChain");
checkType(w, "java.lang.StringBuffer");
checkType(w, "com.sun.corba.se.impl.encoding.CDRInputObject");
checkTypeHierarchy(w, "com.sun.corba.se.impl.interceptors.PIHandlerImpl$RequestInfoStack", true);
checkType(w, "com.sun.corba.se.impl.interceptors.PIHandlerImpl$RequestInfoStack");
checkType(w, "DeclareWarningAndInterfaceMethodCW");
checkType(w, "ICanGetSomething");
checkType(w, "B");
checkType(w, "C");
}
private void checkRtJar(World w) {
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
System.out.println("Processing everything in rt.jar: ~16000 classes");
try {
ZipFile zf = new ZipFile("c:/jvms/jdk1.6.0_06/jre/lib/rt.jar");
Enumeration e = zf.entries();
int count = 1;
while (e.hasMoreElements()) {
ZipEntry ze = (ZipEntry) e.nextElement();
String n = ze.getName();
if (n.endsWith(".class")) {
n = n.replace('/', '.');
n = n.substring(0, n.length() - 6);
if ((count % 100) == 0) {
System.out.print(count + " ");
}
if ((count % 1000) == 0) {
System.out.println();
}
checkType(w, n);
count++;
}
}
zf.close();
} catch (IOException t) {
t.printStackTrace();
fail(t.toString());
}
System.out.println();
}
/**
* Compare time taken to grab them all and look at them and iterator through them all.
|
322,039 |
Bug 322039 Fully qualified ITD has incorrect handle identifier
|
In the following aspect: public aspect Aspect { public void q2.ThisClass.something2() {} } In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified): =AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2 However, it should be (with fully qualified name): =AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2 This means that fully qualified ITDs cannot be navigated to or searched. I'm a little surprised that this doesn't work because I thought I had tests for it...
|
resolved fixed
|
6b35ea4
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2010-08-18T17:29:04Z | 2010-08-07T00:13:20Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
*/
private void speedCheck(World w) {
long stime = System.currentTimeMillis();
try {
ZipFile zf = new ZipFile("c:/jvms/jdk1.6.0_06/jre/lib/rt.jar");
Enumeration e = zf.entries();
while (e.hasMoreElements()) {
ZipEntry ze = (ZipEntry) e.nextElement();
String n = ze.getName();
if (n.endsWith(".class")) {
n = n.replace('/', '.');
n = n.substring(0, n.length() - 6);
ResolvedType typeA = w.resolve(n);
assertFalse(typeA.isMissing());
List<ResolvedMember> viaIteratorList = getThemAll(typeA.getMethods(true, true));
viaIteratorList = getThemAll(typeA.getMethods(false, true));
}
}
zf.close();
} catch (IOException t) {
t.printStackTrace();
fail(t.toString());
}
long etime = System.currentTimeMillis();
System.out.println("Time taken for 'iterator' approach: " + (etime - stime) + "ms");
stime = System.currentTimeMillis();
try {
ZipFile zf = new ZipFile("c:/jvms/jdk1.6.0_06/jre/lib/rt.jar");
Enumeration e = zf.entries();
while (e.hasMoreElements()) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.