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
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
crosscuttingMembers = new CrosscuttingMembers(this, shouldConcretizeIfNeeded); if (getPerClause() == null) { return crosscuttingMembers; } crosscuttingMembers.setPerClause(getPerClause()); crosscuttingMembers.addShadowMungers(collectShadowMungers()); crosscuttingMembers.addTypeMungers(getTypeMungers()); crosscuttingMembers.addDeclares(collectDeclares(!this.doesNotExposeShadowMungers())); crosscuttingMembers.addPrivilegedAccesses(getPrivilegedAccesses()); return crosscuttingMembers; } public final List<Declare> collectDeclares(boolean includeAdviceLike) { if (!this.isAspect()) { return Collections.emptyList(); } List<Declare> ret = new ArrayList<Declare>(); if (!this.isAbstract()) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
final Iterators.Filter<ResolvedType> dupFilter = Iterators.dupFilter(); Iterators.Getter<ResolvedType, ResolvedType> typeGetter = new Iterators.Getter<ResolvedType, ResolvedType>() { public Iterator<ResolvedType> get(ResolvedType o) { return dupFilter.filter((o).getDirectSupertypes()); } }; Iterator<ResolvedType> typeIterator = Iterators.recur(this, typeGetter); while (typeIterator.hasNext()) { ResolvedType ty = typeIterator.next(); for (Iterator<Declare> i = ty.getDeclares().iterator(); i.hasNext();) { Declare dec = i.next(); if (dec.isAdviceLike()) { if (includeAdviceLike) { ret.add(dec); } } else { ret.add(dec); } } } } return ret; } private final List<ShadowMunger> collectShadowMungers() { if (!this.isAspect() || this.isAbstract() || this.doesNotExposeShadowMungers()) { return Collections.emptyList(); } List<ShadowMunger> acc = new ArrayList<ShadowMunger>();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
final Iterators.Filter<ResolvedType> dupFilter = Iterators.dupFilter(); Iterators.Getter<ResolvedType, ResolvedType> typeGetter = new Iterators.Getter<ResolvedType, ResolvedType>() { public Iterator<ResolvedType> get(ResolvedType o) { return dupFilter.filter((o).getDirectSupertypes()); } }; Iterator<ResolvedType> typeIterator = Iterators.recur(this, typeGetter); while (typeIterator.hasNext()) { ResolvedType ty = typeIterator.next(); acc.addAll(ty.getDeclaredShadowMungers()); } return acc; } public void addParent(ResolvedType newParent) { } protected boolean doesNotExposeShadowMungers() { return false; } public PerClause getPerClause() { return null; } public Collection<Declare> getDeclares() { return Collections.emptyList(); } public Collection<ConcreteTypeMunger> getTypeMungers() { return Collections.emptyList(); } public Collection<ResolvedMember> getPrivilegedAccesses() { return Collections.emptyList();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} public final boolean isInterface() { return Modifier.isInterface(getModifiers()); } public final boolean isAbstract() { return Modifier.isAbstract(getModifiers()); } public boolean isClass() { return false; } public boolean isAspect() { return false; } public boolean isAnnotationStyleAspect() { return false; } /** * Note: Only overridden by Name subtype. */ public boolean isEnum() { return false; } /** * Note: Only overridden by Name subtype. */ public boolean isAnnotation() { return false; } public boolean isAnonymous() {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return false; } public boolean isNested() { return false; } public void addAnnotation(AnnotationAJ annotationX) { throw new RuntimeException("ResolvedType.addAnnotation() should never be called"); } public AnnotationAJ[] getAnnotations() { throw new RuntimeException("ResolvedType.getAnnotations() should never be called"); } /** * Note: Only overridden by ReferenceType subtype */ public boolean canAnnotationTargetType() { return false; } /** * Note: Only overridden by ReferenceType subtype */ public AnnotationTargetKind[] getAnnotationTargetKinds() { return null; } /** * Note: Only overridden by Name subtype. */ public boolean isAnnotationWithRuntimeRetention() { return false; } public boolean isSynthetic() {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return signature.indexOf("$ajc") != -1; } public final boolean isFinal() { return Modifier.isFinal(getModifiers()); } protected Map<String, UnresolvedType> getMemberParameterizationMap() { if (!isParameterizedType()) { return Collections.emptyMap(); } TypeVariable[] tvs = getGenericType().getTypeVariables(); Map<String, UnresolvedType> parameterizationMap = new HashMap<String, UnresolvedType>(); for (int i = 0; i < tvs.length; i++) { parameterizationMap.put(tvs[i].getName(), typeParameters[i]); } return parameterizationMap; } public List<ShadowMunger> getDeclaredAdvice() { List<ShadowMunger> l = new ArrayList<ShadowMunger>(); ResolvedMember[] methods = getDeclaredMethods(); if (isParameterizedType()) { methods = getGenericType().getDeclaredMethods(); } Map<String, UnresolvedType> typeVariableMap = getAjMemberParameterizationMap(); for (int i = 0, len = methods.length; i < len; i++) { ShadowMunger munger = methods[i].getAssociatedShadowMunger(); if (munger != null) { if (ajMembersNeedParameterization()) { munger = munger.parameterizeWith(this, typeVariableMap);
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (munger instanceof Advice) { Advice advice = (Advice) munger; UnresolvedType[] ptypes = methods[i].getGenericParameterTypes(); UnresolvedType[] newPTypes = new UnresolvedType[ptypes.length]; for (int j = 0; j < ptypes.length; j++) { if (ptypes[j] instanceof TypeVariableReferenceType) { TypeVariableReferenceType tvrt = (TypeVariableReferenceType) ptypes[j]; if (typeVariableMap.containsKey(tvrt.getTypeVariable().getName())) { newPTypes[j] = typeVariableMap.get(tvrt.getTypeVariable().getName()); } else { newPTypes[j] = ptypes[j]; } } else { newPTypes[j] = ptypes[j]; } } advice.setBindingParameterTypes(newPTypes); } } munger.setDeclaringType(this); l.add(munger); } } return l; } public List<ShadowMunger> getDeclaredShadowMungers() { return getDeclaredAdvice(); }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
public ResolvedMember[] getDeclaredJavaFields() { return filterInJavaVisible(getDeclaredFields()); } public ResolvedMember[] getDeclaredJavaMethods() { return filterInJavaVisible(getDeclaredMethods()); } private ResolvedMember[] filterInJavaVisible(ResolvedMember[] ms) { List<ResolvedMember> l = new ArrayList<ResolvedMember>(); for (int i = 0, len = ms.length; i < len; i++) { if (!ms[i].isAjSynthetic() && ms[i].getAssociatedShadowMunger() == null) { l.add(ms[i]); } } return l.toArray(new ResolvedMember[l.size()]); } public abstract ISourceContext getSourceContext(); public static final ResolvedType[] NONE = new ResolvedType[0]; public static final ResolvedType[] EMPTY_ARRAY = NONE; public static final Missing MISSING = new Missing(); public static ResolvedType makeArray(ResolvedType type, int dim) { if (dim == 0) { return type; } ResolvedType array = new ArrayReferenceType("[" + type.getSignature(), "[" + type.getErasureSignature(), type.getWorld(), type); return makeArray(array, dim - 1); } static class Primitive extends ResolvedType {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
private final int size; private final int index; Primitive(String signature, int size, int index) { super(signature, null); this.size = size; this.index = index; this.typeKind = TypeKind.PRIMITIVE; } @Override public final int getSize() { return size; } @Override public final int getModifiers() { return Modifier.PUBLIC | Modifier.FINAL; } @Override public final boolean isPrimitiveType() { return true; } public boolean hasAnnotation(UnresolvedType ofType) { return false; } @Override public final boolean isAssignableFrom(ResolvedType other) { if (!other.isPrimitiveType()) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (!world.isInJava5Mode()) { return false; } return validBoxing.contains(this.getSignature() + other.getSignature()); } return assignTable[((Primitive) other).index][index]; } @Override public final boolean isAssignableFrom(ResolvedType other, boolean allowMissing) { return isAssignableFrom(other); } @Override public final boolean isCoerceableFrom(ResolvedType other) { if (this == other) { return true; } if (!other.isPrimitiveType()) { return false; } if (index > 6 || ((Primitive) other).index > 6) { return false; } return true; } @Override public ResolvedType resolve(World world) { if (this.world != world) { throw new IllegalStateException(); } this.world = world;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return super.resolve(world); } @Override public final boolean needsNoConversionFrom(ResolvedType other) { if (!other.isPrimitiveType()) { return false; } return noConvertTable[((Primitive) other).index][index]; } private static final boolean[][] assignTable = { { true, true, true, true, true, true, true, false, false }, { false, true, true, true, true, true, false, false, false }, { false, false, true, false, false, false, false, false, false }, { false, false, true, true, false, false, false, false, false }, { false, false, true, true, true, true, false, false, false }, { false, false, true, true, false, true, false, false, false }, { false, false, true, true, true, true, true, false, false }, { false, false, false, false, false, false, false, true, false }, { false, false, false, false, false, false, false, false, true }, }; private static final boolean[][] noConvertTable = { { true, true, false, false, true, false, true, false, false }, { false, true, false, false, true, false, false, false, false }, { false, false, true, false, false, false, false, false, false }, { false, false, false, true, false, false, false, false, false }, { false, false, false, false, true, false, false, false, false }, { false, false, false, false, false, true, false, false, false }, { false, false, false, false, true, false, true, false, false },
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
{ false, false, false, false, false, false, false, true, false }, { false, false, false, false, false, false, false, false, true }, }; @Override public final ResolvedMember[] getDeclaredFields() { return ResolvedMember.NONE; } @Override public final ResolvedMember[] getDeclaredMethods() { return ResolvedMember.NONE; } @Override public final ResolvedType[] getDeclaredInterfaces() { return ResolvedType.NONE; } @Override public final ResolvedMember[] getDeclaredPointcuts() { return ResolvedMember.NONE; } @Override public final ResolvedType getSuperclass() { return null; } @Override public ISourceContext getSourceContext() { return null; } } static class Missing extends ResolvedType {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
Missing() { super(MISSING_NAME, null); } @Override public final String getName() { return MISSING_NAME; } @Override public final boolean isMissing() { return true; } public boolean hasAnnotation(UnresolvedType ofType) { return false; } @Override public final ResolvedMember[] getDeclaredFields() { return ResolvedMember.NONE; } @Override public final ResolvedMember[] getDeclaredMethods() { return ResolvedMember.NONE; } @Override public final ResolvedType[] getDeclaredInterfaces() { return ResolvedType.NONE; }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
@Override public final ResolvedMember[] getDeclaredPointcuts() { return ResolvedMember.NONE; } @Override public final ResolvedType getSuperclass() { return null; } @Override public final int getModifiers() { return 0; } @Override public final boolean isAssignableFrom(ResolvedType other) { return false; } @Override public final boolean isAssignableFrom(ResolvedType other, boolean allowMissing) { return false; } @Override public final boolean isCoerceableFrom(ResolvedType other) { return false; } @Override public boolean needsNoConversionFrom(ResolvedType other) { return false; } @Override public ISourceContext getSourceContext() {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return null; } } /** * Look up a member, takes into account any ITDs on this type. return null if not found */ public ResolvedMember lookupMemberNoSupers(Member member) { ResolvedMember ret = lookupDirectlyDeclaredMemberNoSupers(member); if (ret == null && interTypeMungers != null) { for (ConcreteTypeMunger tm : interTypeMungers) { if (matches(tm.getSignature(), member)) { return tm.getSignature(); } } } return ret; } public ResolvedMember lookupMemberWithSupersAndITDs(Member member) { ResolvedMember ret = lookupMemberNoSupers(member); if (ret != null) { return ret; } ResolvedType supert = getSuperclass(); while (ret == null && supert != null) { ret = supert.lookupMemberNoSupers(member); if (ret == null) { supert = supert.getSuperclass(); } } return ret;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} /** * as lookupMemberNoSupers, but does not include ITDs * * @param member * @return */ public ResolvedMember lookupDirectlyDeclaredMemberNoSupers(Member member) { ResolvedMember ret; if (member.getKind() == Member.FIELD) { ret = lookupMember(member, getDeclaredFields()); } else { ret = lookupMember(member, getDeclaredMethods()); } return ret; } /** * This lookup has specialized behaviour - a null result tells the EclipseTypeMunger that it should make a default * implementation of a method on this type. * * @param member * @return */ public ResolvedMember lookupMemberIncludingITDsOnInterfaces(Member member) { return lookupMemberIncludingITDsOnInterfaces(member, this); } private ResolvedMember lookupMemberIncludingITDsOnInterfaces(Member member, ResolvedType onType) { ResolvedMember ret = onType.lookupMemberNoSupers(member);
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (ret != null) { return ret; } else { ResolvedType superType = onType.getSuperclass(); if (superType != null) { ret = lookupMemberIncludingITDsOnInterfaces(member, superType); } if (ret == null) { ResolvedType[] superInterfaces = onType.getDeclaredInterfaces(); for (int i = 0; i < superInterfaces.length; i++) { ret = superInterfaces[i].lookupMethodInITDs(member); if (ret != null) { return ret; } } } } return ret; } protected List<ConcreteTypeMunger> interTypeMungers = new ArrayList<ConcreteTypeMunger>(); public List<ConcreteTypeMunger> getInterTypeMungers() { return interTypeMungers; } public List<ConcreteTypeMunger> getInterTypeParentMungers() { List<ConcreteTypeMunger> l = new ArrayList<ConcreteTypeMunger>(); for (ConcreteTypeMunger element : interTypeMungers) { if (element.getMunger() instanceof NewParentTypeMunger) { l.add(element); }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} return l; } /** * ??? This method is O(N*M) where N = number of methods and M is number of inter-type declarations in my super */ public List<ConcreteTypeMunger> getInterTypeMungersIncludingSupers() { ArrayList<ConcreteTypeMunger> ret = new ArrayList<ConcreteTypeMunger>(); collectInterTypeMungers(ret); return ret; } public List<ConcreteTypeMunger> getInterTypeParentMungersIncludingSupers() { ArrayList<ConcreteTypeMunger> ret = new ArrayList<ConcreteTypeMunger>(); collectInterTypeParentMungers(ret); return ret; } private void collectInterTypeParentMungers(List<ConcreteTypeMunger> collector) { for (Iterator<ResolvedType> iter = getDirectSupertypes(); iter.hasNext();) { ResolvedType superType = iter.next(); superType.collectInterTypeParentMungers(collector); } collector.addAll(getInterTypeParentMungers()); } protected void collectInterTypeMungers(List<ConcreteTypeMunger> collector) { for (Iterator<ResolvedType> iter = getDirectSupertypes(); iter.hasNext();) { ResolvedType superType = iter.next(); if (superType == null) { throw new BCException("UnexpectedProblem: a supertype in the hierarchy for " + this.getName() + " is null"); } superType.collectInterTypeMungers(collector);
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} outer: for (Iterator<ConcreteTypeMunger> iter1 = collector.iterator(); iter1.hasNext();) { ConcreteTypeMunger superMunger = iter1.next(); if (superMunger.getSignature() == null) { continue; } if (!superMunger.getSignature().isAbstract()) { continue; } for (ConcreteTypeMunger myMunger : getInterTypeMungers()) { if (conflictingSignature(myMunger.getSignature(), superMunger.getSignature())) { iter1.remove(); continue outer; } } if (!superMunger.getSignature().isPublic()) { continue; } for (Iterator<ResolvedMember> iter = getMethods(true, true); iter.hasNext();) { ResolvedMember method = iter.next(); if (conflictingSignature(method, superMunger.getSignature())) { iter1.remove(); continue outer; } } } collector.addAll(getInterTypeMungers()); } /** * Check: 1) That we don't have any abstract type mungers unless this type is abstract. 2) That an abstract ITDM on an interface
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
* is declared public. (Compiler limitation) (PR70794) */ public void checkInterTypeMungers() { if (isAbstract()) { return; } boolean itdProblem = false; for (ConcreteTypeMunger munger : getInterTypeMungersIncludingSupers()) { itdProblem = checkAbstractDeclaration(munger) || itdProblem; } if (itdProblem) { return; } for (ConcreteTypeMunger munger : getInterTypeMungersIncludingSupers()) { if (munger.getSignature() != null && munger.getSignature().isAbstract()) { if (munger.getMunger().getKind() == ResolvedTypeMunger.MethodDelegate2) { } else { world.getMessageHandler() .handleMessage( new Message("must implement abstract inter-type declaration: " + munger.getSignature(), "", IMessage.ERROR, getSourceLocation(), null, new ISourceLocation[] { getMungerLocation(munger) })); } } } } /** * See PR70794. This method checks that if an abstract inter-type method declaration is made on an interface then it must also
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
* be public. This is a compiler limitation that could be made to work in the future (if someone provides a worthwhile usecase) * * @return indicates if the munger failed the check */ private boolean checkAbstractDeclaration(ConcreteTypeMunger munger) { if (munger.getMunger() != null && (munger.getMunger() instanceof NewMethodTypeMunger)) { ResolvedMember itdMember = munger.getSignature(); ResolvedType onType = itdMember.getDeclaringType().resolve(world); if (onType.isInterface() && itdMember.isAbstract() && !itdMember.isPublic()) { world.getMessageHandler().handleMessage( new Message(WeaverMessages.format(WeaverMessages.ITD_ABSTRACT_MUST_BE_PUBLIC_ON_INTERFACE, munger.getSignature(), onType), "", Message.ERROR, getSourceLocation(), null, new ISourceLocation[] { getMungerLocation(munger) })); return true; } } return false; } /** * Get a source location for the munger. Until intertype mungers remember where they came from, the source location for the * munger itself is null. In these cases use the source location for the aspect containing the ITD. */ private ISourceLocation getMungerLocation(ConcreteTypeMunger munger) { ISourceLocation sloc = munger.getSourceLocation(); if (sloc == null) { sloc = munger.getAspectType().getSourceLocation(); } return sloc; } /**
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
* Returns a ResolvedType object representing the declaring type of this type, or null if this type does not represent a * non-package-level-type. * <p/> * <strong>Warning</strong>: This is guaranteed to work for all member types. For anonymous/local types, the only guarantee is * given in JLS 13.1, where it guarantees that if you call getDeclaringType() repeatedly, you will eventually get the top-level * class, but it does not say anything about classes in between. * * @return the declaring UnresolvedType object, or null. */ public ResolvedType getDeclaringType() { if (isArray()) { return null; } String name = getName(); int lastDollar = name.lastIndexOf('$'); while (lastDollar > 0) { ResolvedType ret = world.resolve(UnresolvedType.forName(name.substring(0, lastDollar)), true); if (!ResolvedType.isMissing(ret)) { return ret; } lastDollar = name.lastIndexOf('$', lastDollar - 1); } return null; } public static boolean isVisible(int modifiers, ResolvedType targetType, ResolvedType fromType) { if (Modifier.isPublic(modifiers)) { return true; } else if (Modifier.isPrivate(modifiers)) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return targetType.getOutermostType().equals(fromType.getOutermostType()); } else if (Modifier.isProtected(modifiers)) { return samePackage(targetType, fromType) || targetType.isAssignableFrom(fromType); } else { return samePackage(targetType, fromType); } } private static boolean samePackage(ResolvedType targetType, ResolvedType fromType) { String p1 = targetType.getPackageName(); String p2 = fromType.getPackageName(); if (p1 == null) { return p2 == null; } if (p2 == null) { return false; } return p1.equals(p2); } /** * Checks if the generic type for 'this' and the generic type for 'other' are the same - it can be passed raw or parameterized * versions and will just compare the underlying generic type. */ private boolean genericTypeEquals(ResolvedType other) { ResolvedType rt = other; if (rt.isParameterizedType() || rt.isRawType()) { rt.getGenericType(); } if (((isParameterizedType() || isRawType()) && getGenericType().equals(rt)) || (this.equals(other))) { return true; }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return false; } /** * Look up the actual occurence of a particular type in the hierarchy for 'this' type. The input is going to be a generic type, * and the caller wants to know if it was used in its RAW or a PARAMETERIZED form in this hierarchy. * * returns null if it can't be found. */ public ResolvedType discoverActualOccurrenceOfTypeInHierarchy(ResolvedType lookingFor) { if (!lookingFor.isGenericType()) { throw new BCException("assertion failed: method should only be called with generic type, but " + lookingFor + " is " + lookingFor.typeKind); } if (this.equals(ResolvedType.OBJECT)) { return null; } if (genericTypeEquals(lookingFor)) { return this; } ResolvedType superT = getSuperclass(); if (superT.genericTypeEquals(lookingFor)) { return superT; } ResolvedType[] superIs = getDeclaredInterfaces(); for (int i = 0; i < superIs.length; i++) { ResolvedType superI = superIs[i]; if (superI.genericTypeEquals(lookingFor)) { return superI; } ResolvedType checkTheSuperI = superI.discoverActualOccurrenceOfTypeInHierarchy(lookingFor);
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (checkTheSuperI != null) { return checkTheSuperI; } } return superT.discoverActualOccurrenceOfTypeInHierarchy(lookingFor); } /** * Called for all type mungers but only does something if they share type variables with a generic type which they target. When * this happens this routine will check for the target type in the target hierarchy and 'bind' any type parameters as * appropriate. For example, for the ITD "List<T> I<T>.x" against a type like this: "class A implements I<String>" this routine * will return a parameterized form of the ITD "List<String> I.x" */ public ConcreteTypeMunger fillInAnyTypeParameters(ConcreteTypeMunger munger) { boolean debug = false; ResolvedMember member = munger.getSignature(); if (munger.isTargetTypeParameterized()) { if (debug) { System.err.println("Processing attempted parameterization of " + munger + " targetting type " + this); } if (debug) { System.err.println(" This type is " + this + " (" + typeKind + ")"); } if (debug) { System.err.println(" Signature that needs parameterizing: " + member); } ResolvedType onTypeResolved = world.resolve(member.getDeclaringType()); ResolvedType onType = onTypeResolved.getGenericType(); if (onType == null) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
getWorld().getMessageHandler().handleMessage( MessageUtil.error("The target type for the intertype declaration is not generic", munger.getSourceLocation())); return munger; } member.resolve(world); if (debug) { System.err.println(" Actual target ontype: " + onType + " (" + onType.typeKind + ")"); } ResolvedType actualTarget = discoverActualOccurrenceOfTypeInHierarchy(onType); if (actualTarget == null) { throw new BCException("assertion failed: asked " + this + " for occurrence of " + onType + " in its hierarchy??"); } if (!actualTarget.isGenericType()) { if (debug) { System.err.println("Occurrence in " + this + " is actually " + actualTarget + " (" + actualTarget.typeKind + ")"); } }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
munger = munger.parameterizedFor(actualTarget); if (debug) { System.err.println("New sig: " + munger.getSignature()); } if (debug) { System.err.println("====================================="); } } return munger; } /** * Add an intertype munger to this type. isDuringCompilation tells us if we should be checking for an error scenario where two * ITD fields are trying to use the same name. When this happens during compilation one of them is altered to get mangled name * but when it happens during weaving it is too late and we need to put out an error asking them to recompile. */ public void addInterTypeMunger(ConcreteTypeMunger munger, boolean isDuringCompilation) { ResolvedMember sig = munger.getSignature(); bits = (bits & ~MungersAnalyzed); if (sig == null || munger.getMunger() == null || munger.getMunger().getKind() == ResolvedTypeMunger.PrivilegedAccess) { interTypeMungers.add(munger); return; }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
munger = fillInAnyTypeParameters(munger); sig = munger.getSignature(); if (sig.getKind() == Member.METHOD) { if (clashesWithExistingMember(munger, getMethods(true, false))) { return; } if (this.isInterface()) { if (clashesWithExistingMember(munger, Arrays.asList(world.getCoreType(OBJECT).getDeclaredMethods()).iterator())) { return; } } } else if (sig.getKind() == Member.FIELD) { if (clashesWithExistingMember(munger, Arrays.asList(getDeclaredFields()).iterator())) { return; } if (!isDuringCompilation) { ResolvedTypeMunger thisRealMunger = munger.getMunger(); if (thisRealMunger instanceof NewFieldTypeMunger) { NewFieldTypeMunger newFieldTypeMunger = (NewFieldTypeMunger) thisRealMunger; if (newFieldTypeMunger.version == NewFieldTypeMunger.VersionTwo) { String thisRealMungerSignatureName = newFieldTypeMunger.getSignature().getName(); for (ConcreteTypeMunger typeMunger : interTypeMungers) { if (typeMunger.getMunger() instanceof NewFieldTypeMunger) { if (typeMunger.getSignature().getKind() == Member.FIELD) { NewFieldTypeMunger existing = (NewFieldTypeMunger) typeMunger.getMunger();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (existing.getSignature().getName().equals(thisRealMungerSignatureName) && existing.version == NewFieldTypeMunger.VersionTwo && existing.getSignature().getDeclaringType() .equals(newFieldTypeMunger.getSignature().getDeclaringType())) { StringBuffer sb = new StringBuffer(); sb.append("Cannot handle two aspects both attempting to use new style ITDs for the same named field "); sb.append("on the same target type. Please recompile at least one aspect with '-Xset:itdVersion=1'."); sb.append(" Aspects involved: " + munger.getAspectType().getName() + " and " + typeMunger.getAspectType().getName() + "."); sb.append(" Field is named '" + existing.getSignature().getName() + "'"); getWorld().getMessageHandler().handleMessage( new Message(sb.toString(), getSourceLocation(), true)); return; } } } } } } } } else { if (clashesWithExistingMember(munger, Arrays.asList(getDeclaredMethods()).iterator())) { return; } } boolean needsAdding =true; boolean needsToBeAddedEarlier =false;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
for (Iterator<ConcreteTypeMunger> i = interTypeMungers.iterator(); i.hasNext();) { ConcreteTypeMunger existingMunger = i.next(); boolean v2itds = munger.getSignature().getKind()== Member.FIELD && (munger.getMunger() instanceof NewFieldTypeMunger) && ((NewFieldTypeMunger)munger.getMunger()).version==NewFieldTypeMunger.VersionTwo; if (conflictingSignature(existingMunger.getSignature(), munger.getSignature(),v2itds)) { if (isVisible(munger.getSignature().getModifiers(), munger.getAspectType(), existingMunger.getAspectType())) { int c = compareMemberPrecedence(sig, existingMunger.getSignature()); if (c == 0) { c = getWorld().compareByPrecedenceAndHierarchy(munger.getAspectType(), existingMunger.getAspectType()); } if (c < 0) { checkLegalOverride(munger.getSignature(), existingMunger.getSignature(), 0x11, null); needsAdding = false; if (munger.getSignature().getKind()== Member.FIELD && munger.getSignature().getDeclaringType().resolve(world).isInterface() && ((NewFieldTypeMunger)munger.getMunger()).version==NewFieldTypeMunger.VersionTwo) { needsAdding=true; } break; } else if (c > 0) { checkLegalOverride(existingMunger.getSignature(), munger.getSignature(), 0x11, null); if (existingMunger.getSignature().getKind()==Member.FIELD && existingMunger.getSignature().getDeclaringType().resolve(world).isInterface() && ((NewFieldTypeMunger)existingMunger.getMunger()).version==NewFieldTypeMunger.VersionTwo) { needsToBeAddedEarlier=true; } else { i.remove();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} break; } else { interTypeConflictError(munger, existingMunger); interTypeConflictError(existingMunger, munger); return; } } } } if (needsAdding) { if (!needsToBeAddedEarlier) { interTypeMungers.add(munger); } else { interTypeMungers.add(0,munger); } } } /** * Compare the type transformer with the existing members. A clash may not be an error (the ITD may be the 'default * implementation') so returning false is not always a sign of an error. * * @return true if there is a clash */ private boolean clashesWithExistingMember(ConcreteTypeMunger typeTransformer, Iterator<ResolvedMember> existingMembers) { ResolvedMember typeTransformerSignature = typeTransformer.getSignature();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
ResolvedTypeMunger rtm = typeTransformer.getMunger(); boolean v2itds = true; if (rtm instanceof NewFieldTypeMunger && ((NewFieldTypeMunger)rtm).version==NewFieldTypeMunger.VersionOne) { v2itds = false; } while (existingMembers.hasNext()) { ResolvedMember existingMember = existingMembers.next(); if (existingMember.isBridgeMethod()) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
continue; } if (conflictingSignature(existingMember, typeTransformerSignature,v2itds)) { if (isVisible(existingMember.getModifiers(), this, typeTransformer.getAspectType())) { int c = compareMemberPrecedence(typeTransformerSignature, existingMember); if (c < 0) { checkLegalOverride(typeTransformerSignature, existingMember, 0x10, typeTransformer.getAspectType()); return true; } else if (c > 0) { checkLegalOverride(existingMember, typeTransformerSignature, 0x01, typeTransformer.getAspectType()); continue; } else { boolean sameReturnTypes = (existingMember.getReturnType().equals(typeTransformerSignature.getReturnType())); if (sameReturnTypes) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
boolean isDuplicateOfPreviousITD = false; ResolvedType declaringRt = existingMember.getDeclaringType().resolve(world); WeaverStateInfo wsi = declaringRt.getWeaverState(); if (wsi != null) { List<ConcreteTypeMunger> mungersAffectingThisType = wsi.getTypeMungers(declaringRt); if (mungersAffectingThisType != null) { for (Iterator<ConcreteTypeMunger> iterator = mungersAffectingThisType.iterator(); iterator .hasNext() && !isDuplicateOfPreviousITD;) { ConcreteTypeMunger ctMunger = iterator.next(); if (ctMunger.getSignature().equals(existingMember) && ctMunger.aspectType.equals(typeTransformer.getAspectType())) { isDuplicateOfPreviousITD = true; } } } } if (!isDuplicateOfPreviousITD) { if (!(typeTransformerSignature.getName().equals("<init>") && existingMember.isDefaultConstructor())) { String aspectName = typeTransformer.getAspectType().getName(); ISourceLocation typeTransformerLocation = typeTransformer.getSourceLocation();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
ISourceLocation existingMemberLocation = existingMember.getSourceLocation(); String msg = WeaverMessages.format(WeaverMessages.ITD_MEMBER_CONFLICT, aspectName, existingMember); getWorld().getMessageHandler().handleMessage(new Message(msg, typeTransformerLocation, true)); if (existingMemberLocation != null) { getWorld().getMessageHandler() .handleMessage(new Message(msg, existingMemberLocation, true)); } return true; } } } } } else if (isDuplicateMemberWithinTargetType(existingMember, this, typeTransformerSignature)) { getWorld().getMessageHandler().handleMessage( MessageUtil.error(WeaverMessages.format(WeaverMessages.ITD_MEMBER_CONFLICT, typeTransformer .getAspectType().getName(), existingMember), typeTransformer.getSourceLocation())); return true; } } } return false; }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
private boolean isDuplicateMemberWithinTargetType(ResolvedMember existingMember, ResolvedType targetType, ResolvedMember itdMember) { if ((existingMember.isAbstract() || itdMember.isAbstract())) { return false; } UnresolvedType declaringType = existingMember.getDeclaringType(); if (!targetType.equals(declaringType)) { return false; } if (Modifier.isPrivate(itdMember.getModifiers())) { return false; } if (itdMember.isPublic()) { return true; } if (!targetType.getPackageName().equals(itdMember.getDeclaringType().getPackageName())) { return false; } return true; } /** * @param transformerPosition which parameter is the type transformer (0x10 for first, 0x01 for second, 0x11 for both, 0x00 for * neither)
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
* @param aspectType the declaring type of aspect defining the *first* type transformer * @return true if the override is legal note: calling showMessage with two locations issues TWO messages, not ONE message with * an additional source location. */ public boolean checkLegalOverride(ResolvedMember parent, ResolvedMember child, int transformerPosition, ResolvedType aspectType) { if (Modifier.isFinal(parent.getModifiers())) { if (transformerPosition == 0x10 && aspectType != null) { ResolvedType nonItdDeclaringType = child.getDeclaringType().resolve(world); WeaverStateInfo wsi = nonItdDeclaringType.getWeaverState(); if (wsi != null) { List<ConcreteTypeMunger> transformersOnThisType = wsi.getTypeMungers(nonItdDeclaringType); if (transformersOnThisType != null) { for (ConcreteTypeMunger transformer : transformersOnThisType) { if (transformer.aspectType.equals(aspectType)) { if (parent.equalsApartFromDeclaringType(transformer.getSignature())) { return true; } } }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} } } world.showMessage(Message.ERROR, WeaverMessages.format(WeaverMessages.CANT_OVERRIDE_FINAL_MEMBER, parent), child.getSourceLocation(), null); return false; } boolean incompatibleReturnTypes = false; if (world.isInJava5Mode() && parent.getKind() == Member.METHOD) { ResolvedType rtParentReturnType = parent.resolve(world).getGenericReturnType().resolve(world); ResolvedType rtChildReturnType = child.resolve(world).getGenericReturnType().resolve(world); incompatibleReturnTypes = !rtParentReturnType.isAssignableFrom(rtChildReturnType); } else { incompatibleReturnTypes = !parent.getReturnType().equals(child.getReturnType()); } if (incompatibleReturnTypes) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_RETURN_TYPE_MISMATCH, parent, child), child.getSourceLocation(), parent.getSourceLocation()); return false; } if (parent.getKind() == Member.POINTCUT) { UnresolvedType[] pTypes = parent.getParameterTypes();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
UnresolvedType[] cTypes = child.getParameterTypes(); if (!Arrays.equals(pTypes, cTypes)) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_PARAM_TYPE_MISMATCH, parent, child), child.getSourceLocation(), parent.getSourceLocation()); return false; } } if (isMoreVisible(parent.getModifiers(), child.getModifiers())) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_VISIBILITY_REDUCTION, parent, child), child.getSourceLocation(), parent.getSourceLocation()); return false; } ResolvedType[] childExceptions = world.resolve(child.getExceptions()); ResolvedType[] parentExceptions = world.resolve(parent.getExceptions()); ResolvedType runtimeException = world.resolve("java.lang.RuntimeException"); ResolvedType error = world.resolve("java.lang.Error"); outer: for (int i = 0, leni = childExceptions.length; i < leni; i++) { if (runtimeException.isAssignableFrom(childExceptions[i])) { continue; } if (error.isAssignableFrom(childExceptions[i])) { continue; } for (int j = 0, lenj = parentExceptions.length; j < lenj; j++) { if (parentExceptions[j].isAssignableFrom(childExceptions[i])) { continue outer;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} } return false; } boolean parentStatic = Modifier.isStatic(parent.getModifiers()); boolean childStatic = Modifier.isStatic(child.getModifiers()); if (parentStatic && !childStatic) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_OVERRIDDEN_STATIC, child, parent), child.getSourceLocation(), null); return false; } else if (childStatic && !parentStatic) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_OVERIDDING_STATIC, child, parent), child.getSourceLocation(), null); return false; } return true; } private int compareMemberPrecedence(ResolvedMember m1, ResolvedMember m2) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (Modifier.isProtected(m2.getModifiers()) && m2.getName().charAt(0) == 'c') { UnresolvedType declaring = m2.getDeclaringType(); if (declaring != null) { if (declaring.getName().equals("java.lang.Object") && m2.getName().equals("clone")) { return +1; } } } if (Modifier.isAbstract(m1.getModifiers())) { return -1; } if (Modifier.isAbstract(m2.getModifiers())) { return +1; } if (m1.getDeclaringType().equals(m2.getDeclaringType())) { return 0; } ResolvedType t1 = m1.getDeclaringType().resolve(world); ResolvedType t2 = m2.getDeclaringType().resolve(world); if (t1.isAssignableFrom(t2)) { return -1; } if (t2.isAssignableFrom(t1)) { return +1; } return 0; } public static boolean isMoreVisible(int m1, int m2) { if (Modifier.isPrivate(m1)) { return false;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} if (isPackage(m1)) { return Modifier.isPrivate(m2); } if (Modifier.isProtected(m1)) { return (Modifier.isPrivate(m2) || isPackage(m2)); } if (Modifier.isPublic(m1)) { return !Modifier.isPublic(m2); } throw new RuntimeException("bad modifier: " + m1); } private static boolean isPackage(int i) { return (0 == (i & (Modifier.PUBLIC | Modifier.PRIVATE | Modifier.PROTECTED))); } private void interTypeConflictError(ConcreteTypeMunger m1, ConcreteTypeMunger m2) { /* * if (m1.getMunger().getKind() == ResolvedTypeMunger.Field && m2.getMunger().getKind() == ResolvedTypeMunger.Field) { if * *exactly* the same, it's ok return true; } */ getWorld().showMessage( IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_CONFLICT, m1.getAspectType().getName(), m2.getSignature(), m2 .getAspectType().getName()), m2.getSourceLocation(), getSourceLocation()); } public ResolvedMember lookupSyntheticMember(Member member) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
for (ConcreteTypeMunger m : interTypeMungers) { ResolvedMember ret = m.getMatchingSyntheticMember(member); if (ret != null) { return ret; } } if (world.isJoinpointArrayConstructionEnabled() && this.isArray()) { if (member.getKind() == Member.CONSTRUCTOR) { ResolvedMemberImpl ret = new ResolvedMemberImpl(Member.CONSTRUCTOR, this, Modifier.PUBLIC, UnresolvedType.VOID, "<init>", world.resolve(member.getParameterTypes())); int count = ret.getParameterTypes().length; String[] paramNames = new String[count]; for (int i = 0; i < count; i++) { paramNames[i] = new StringBuffer("dim").append(i).toString(); } ret.setParameterNames(paramNames); return ret; } } return null;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} static class SuperClassWalker implements Iterator<ResolvedType> { private ResolvedType curr; private SuperInterfaceWalker iwalker; private boolean wantGenerics; public SuperClassWalker(ResolvedType type, SuperInterfaceWalker iwalker, boolean genericsAware) { this.curr = type; this.iwalker = iwalker; this.wantGenerics = genericsAware; } public boolean hasNext() { return curr != null; } public ResolvedType next() { ResolvedType ret = curr; if (!wantGenerics && ret.isParameterizedOrGenericType()) { ret = ret.getRawType(); } iwalker.push(ret); curr = curr.getSuperclass(); return ret; } public void remove() { throw new UnsupportedOperationException(); } } static class SuperInterfaceWalker implements Iterator<ResolvedType> { private Getter<ResolvedType, ResolvedType> ifaceGetter; Iterator<ResolvedType> delegate = null; public Queue<ResolvedType> toPersue = new LinkedList<ResolvedType>();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
public Set<ResolvedType> visited = new HashSet<ResolvedType>(); SuperInterfaceWalker(Iterators.Getter<ResolvedType, ResolvedType> ifaceGetter) { this.ifaceGetter = ifaceGetter; } SuperInterfaceWalker(Iterators.Getter<ResolvedType, ResolvedType> ifaceGetter, ResolvedType interfaceType) { this.ifaceGetter = ifaceGetter; this.delegate = Iterators.one(interfaceType); } public boolean hasNext() { if (delegate == null || !delegate.hasNext()) { if (toPersue.isEmpty()) { return false; } do { ResolvedType next = toPersue.remove(); visited.add(next); delegate = ifaceGetter.get(next); } while (!delegate.hasNext() && !toPersue.isEmpty()); } return delegate.hasNext(); } public void push(ResolvedType ret) { toPersue.add(ret); } public ResolvedType next() { ResolvedType next = delegate.next();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (visited.add(next)) { toPersue.add(next); } return next; } public void remove() { throw new UnsupportedOperationException(); } } public void clearInterTypeMungers() { if (isRawType()) { ResolvedType genericType = getGenericType(); if (genericType.isRawType()) { System.err.println("DebugFor341926: Type " + this.getName() + " has an incorrect generic form"); } else { genericType.clearInterTypeMungers(); } } interTypeMungers = new ArrayList<ConcreteTypeMunger>(); } public boolean isTopmostImplementor(ResolvedType interfaceType) { boolean b = true; if (isInterface()) { b = false; } else if (!interfaceType.isAssignableFrom(this, true)) { b = false; } else {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
ResolvedType superclass = this.getSuperclass(); if (superclass.isMissing()) { b = true; } else if (interfaceType.isAssignableFrom(superclass, true)) { b = false; } } return b; } public ResolvedType getTopmostImplementor(ResolvedType interfaceType) { if (isInterface()) { return null; } if (!interfaceType.isAssignableFrom(this)) { return null; } ResolvedType higherType = this.getSuperclass().getTopmostImplementor(interfaceType); if (higherType != null) { return higherType; } return this; } public List<ResolvedMember> getExposedPointcuts() { List<ResolvedMember> ret = new ArrayList<ResolvedMember>(); if (getSuperclass() != null) { ret.addAll(getSuperclass().getExposedPointcuts()); } for (ResolvedType type : getDeclaredInterfaces()) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
addPointcutsResolvingConflicts(ret, Arrays.asList(type.getDeclaredPointcuts()), false); } addPointcutsResolvingConflicts(ret, Arrays.asList(getDeclaredPointcuts()), true); for (ResolvedMember member : ret) { ResolvedPointcutDefinition inherited = (ResolvedPointcutDefinition) member; if (inherited != null && inherited.isAbstract()) { if (!this.isAbstract()) { getWorld().showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.POINCUT_NOT_CONCRETE, inherited, this.getName()), inherited.getSourceLocation(), this.getSourceLocation()); } } } return ret; } private void addPointcutsResolvingConflicts(List<ResolvedMember> acc, List<ResolvedMember> added, boolean isOverriding) { for (Iterator<ResolvedMember> i = added.iterator(); i.hasNext();) { ResolvedPointcutDefinition toAdd = (ResolvedPointcutDefinition) i.next(); for (Iterator<ResolvedMember> j = acc.iterator(); j.hasNext();) { ResolvedPointcutDefinition existing = (ResolvedPointcutDefinition) j.next(); if (toAdd == null || existing == null || existing == toAdd) { continue; } UnresolvedType pointcutDeclaringTypeUT = existing.getDeclaringType(); if (pointcutDeclaringTypeUT != null) { ResolvedType pointcutDeclaringType = pointcutDeclaringTypeUT.resolve(getWorld()); if (!isVisible(existing.getModifiers(), pointcutDeclaringType, this)) { if (existing.isAbstract() && conflictingSignature(existing, toAdd)) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
getWorld().showMessage( IMessage.ERROR, WeaverMessages.format(WeaverMessages.POINTCUT_NOT_VISIBLE, existing.getDeclaringType() .getName() + "." + existing.getName() + "()", this.getName()), toAdd.getSourceLocation(), null); j.remove(); } continue; } } if (conflictingSignature(existing, toAdd)) { if (isOverriding) { checkLegalOverride(existing, toAdd, 0x00, null); j.remove(); } else { getWorld().showMessage( IMessage.ERROR, WeaverMessages.format(WeaverMessages.CONFLICTING_INHERITED_POINTCUTS, this.getName() + toAdd.getSignature()), existing.getSourceLocation(), toAdd.getSourceLocation()); j.remove(); } } } acc.add(toAdd); } } public ISourceLocation getSourceLocation() { return null; }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
public boolean isExposedToWeaver() { return false; } public WeaverStateInfo getWeaverState() { return null; } /** * Overridden by ReferenceType to return a sensible answer for parameterized and raw types. * * @return */ public ReferenceType getGenericType() { return null; } @Override public ResolvedType getRawType() { return super.getRawType().resolve(world); } public ResolvedType parameterizedWith(UnresolvedType[] typeParameters) { if (!(isGenericType() || isParameterizedType())) { return this; } return TypeFactory.createParameterizedType(this.getGenericType(), typeParameters, getWorld()); } /** * Iff I am a parameterized type, and any of my parameters are type variable references (or nested parameterized types), * return a version with those type parameters replaced in accordance with the passed bindings. */
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
@Override public UnresolvedType parameterize(Map<String, UnresolvedType> typeBindings) { if (!isParameterizedType()) { return this; } boolean workToDo = false; for (int i = 0; i < typeParameters.length; i++) { if (typeParameters[i].isTypeVariableReference() || (typeParameters[i] instanceof BoundedReferenceType) || typeParameters[i].isParameterizedType()) { workToDo = true; } } if (!workToDo) { return this; } else { UnresolvedType[] newTypeParams = new UnresolvedType[typeParameters.length]; for (int i = 0; i < newTypeParams.length; i++) { newTypeParams[i] = typeParameters[i]; if (newTypeParams[i].isTypeVariableReference()) { TypeVariableReferenceType tvrt = (TypeVariableReferenceType) newTypeParams[i]; UnresolvedType binding = typeBindings.get(tvrt.getTypeVariable().getName()); if (binding != null) { newTypeParams[i] = binding; } } else if (newTypeParams[i] instanceof BoundedReferenceType) { BoundedReferenceType brType = (BoundedReferenceType) newTypeParams[i]; newTypeParams[i] = brType.parameterize(typeBindings); } else if (newTypeParams[i].isParameterizedType()) { newTypeParams[i] = newTypeParams[i].parameterize(typeBindings);
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} } return TypeFactory.createParameterizedType(getGenericType(), newTypeParams, getWorld()); } } /** * Similar to the above method, but accumulates the super types * * @return */
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
/** * @return true if assignable to java.lang.Exception */ public boolean isException() { return (world.getCoreType(UnresolvedType.JL_EXCEPTION).isAssignableFrom(this)); } /** * @return true if it is an exception and it is a checked one, false otherwise. */ public boolean isCheckedException() { if (!isException()) { return false; } if (world.getCoreType(UnresolvedType.RUNTIME_EXCEPTION).isAssignableFrom(this)) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return false; } return true; } /** * Determines if variables of this type could be assigned values of another with lots of help. java.lang.Object is convertable * from all types. A primitive type is convertable from X iff it's assignable from X. A reference type is convertable from X iff * it's coerceable from X. In other words, X isConvertableFrom Y iff the compiler thinks that _some_ value of Y could be * assignable to a variable of type X without loss of precision. * * @param other the other type * @param world the {@link World} in which the possible assignment should be checked. * @return true iff variables of this type could be assigned values of other with possible conversion */ public final boolean isConvertableFrom(ResolvedType other) { if (this.equals(OBJECT)) { return true; } if (world.isInJava5Mode()) { if (this.isPrimitiveType() ^ other.isPrimitiveType()) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (validBoxing.contains(this.getSignature() + other.getSignature())) { return true; } } } if (this.isPrimitiveType() || other.isPrimitiveType()) { return this.isAssignableFrom(other); } return this.isCoerceableFrom(other); } /** * Determines if the variables of this type could be assigned values of another type without casting. This still allows for * assignment conversion as per JLS 2ed 5.2. For object types, this means supertypeOrEqual(THIS, OTHER). * * @param other the other type * @param world the {@link World} in which the possible assignment should be checked. * @return true iff variables of this type could be assigned values of other without casting * @throws NullPointerException if other is null */ public abstract boolean isAssignableFrom(ResolvedType other); public abstract boolean isAssignableFrom(ResolvedType other, boolean allowMissing); /** * Determines if values of another type could possibly be cast to this type. The rules followed are from JLS 2ed 5.5, * "Casting Conversion". * <p/> * <p> * This method should be commutative, i.e., for all UnresolvedType a, b and all World w: * <p/> * <blockquote>
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
* * <pre> * a.isCoerceableFrom(b, w) == b.isCoerceableFrom(a, w) * </pre> * * </blockquote> * * @param other the other type * @param world the {@link World} in which the possible coersion should be checked. * @return true iff values of other could possibly be cast to this type. * @throws NullPointerException if other is null. */ public abstract boolean isCoerceableFrom(ResolvedType other); public boolean needsNoConversionFrom(ResolvedType o) { return isAssignableFrom(o); } public String getSignatureForAttribute() { return signature; } private FuzzyBoolean parameterizedWithTypeVariable = FuzzyBoolean.MAYBE; /** * return true if the parameterization of this type includes a member type variable. Member type variables occur in generic * methods/ctors. */ public boolean isParameterizedWithTypeVariable() { if (parameterizedWithTypeVariable == FuzzyBoolean.MAYBE) { if (typeParameters == null || typeParameters.length == 0) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
parameterizedWithTypeVariable = FuzzyBoolean.NO; return false; } for (int i = 0; i < typeParameters.length; i++) { ResolvedType aType = (ResolvedType) typeParameters[i]; if (aType.isTypeVariableReference() ) { parameterizedWithTypeVariable = FuzzyBoolean.YES; return true; } if (aType.isParameterizedType()) { boolean b = aType.isParameterizedWithTypeVariable(); if (b) { parameterizedWithTypeVariable = FuzzyBoolean.YES; return true; } } if (aType.isGenericWildcard()) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
BoundedReferenceType boundedRT = (BoundedReferenceType) aType; if (boundedRT.isExtends()) { boolean b = false; UnresolvedType upperBound = boundedRT.getUpperBound(); if (upperBound.isParameterizedType()) { b = ((ResolvedType) upperBound).isParameterizedWithTypeVariable(); } else if (upperBound.isTypeVariableReference() && ((TypeVariableReference) upperBound).getTypeVariable().getDeclaringElementKind() == TypeVariable.METHOD) { b = true; } if (b) { parameterizedWithTypeVariable = FuzzyBoolean.YES; return true; } } if (boundedRT.isSuper()) { boolean b = false; UnresolvedType lowerBound = boundedRT.getLowerBound(); if (lowerBound.isParameterizedType()) { b = ((ResolvedType) lowerBound).isParameterizedWithTypeVariable(); } else if (lowerBound.isTypeVariableReference() && ((TypeVariableReference) lowerBound).getTypeVariable().getDeclaringElementKind() == TypeVariable.METHOD) { b = true; } if (b) { parameterizedWithTypeVariable = FuzzyBoolean.YES; return true; } }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} } parameterizedWithTypeVariable = FuzzyBoolean.NO; } return parameterizedWithTypeVariable.alwaysTrue(); } protected boolean ajMembersNeedParameterization() { if (isParameterizedType()) { return true; } ResolvedType superclass = getSuperclass(); if (superclass != null && !superclass.isMissing()) { return superclass.ajMembersNeedParameterization(); } return false; } protected Map<String, UnresolvedType> getAjMemberParameterizationMap() { Map<String, UnresolvedType> myMap = getMemberParameterizationMap(); if (myMap.isEmpty()) { if (getSuperclass() != null) { return getSuperclass().getAjMemberParameterizationMap(); } } return myMap; } public void setBinaryPath(String binaryPath) { this.binaryPath = binaryPath; }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
/** * Returns the path to the jar or class file from which this binary aspect came or null if not a binary aspect */ public String getBinaryPath() { return binaryPath; } /** * Undo any temporary modifications to the type (for example it may be holding annotations temporarily whilst some matching is * occurring - These annotations will be added properly during weaving but sometimes for type completion they need to be held * here for a while). */ public void ensureConsistent() { } /** * For an annotation type, this will return if it is marked with @Inherited */ public boolean isInheritedAnnotation() { ensureAnnotationBitsInitialized(); return (bits & AnnotationMarkedInherited) != 0; } /* * Setup the bitflags if they have not already been done. */ private void ensureAnnotationBitsInitialized() { if ((bits & AnnotationBitsInitialized) == 0) { bits |= AnnotationBitsInitialized; if (hasAnnotation(UnresolvedType.AT_INHERITED)) { bits |= AnnotationMarkedInherited;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} } } private boolean hasNewParentMungers() { if ((bits & MungersAnalyzed) == 0) { bits |= MungersAnalyzed; for (ConcreteTypeMunger munger : interTypeMungers) { ResolvedTypeMunger resolvedTypeMunger = munger.getMunger(); if (resolvedTypeMunger != null && resolvedTypeMunger.getKind() == ResolvedTypeMunger.Parent) { bits |= HasParentMunger; } } } return (bits & HasParentMunger) != 0; } public void tagAsTypeHierarchyComplete() { bits |= TypeHierarchyCompleteBit; } public boolean isTypeHierarchyComplete() { return (bits & TypeHierarchyCompleteBit) != 0; } /** * return the weaver version used to build this type - defaults to the most recent version unless discovered otherwise. * * @return the (major) version, {@link WeaverVersionInfo} */ public int getCompilerVersion() { return WeaverVersionInfo.getCurrentWeaverMajorVersion(); } public boolean isPrimitiveArray() {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return false; } public boolean isGroovyObject() { if ((bits & GroovyObjectInitialized) == 0) { ResolvedType[] intfaces = getDeclaredInterfaces(); boolean done = false; if (intfaces != null) { for (ResolvedType intface : intfaces) { if (intface.getName().equals("groovy.lang.GroovyObject")) { bits |= IsGroovyObject; done = true; break; } } } if (!done) { if (getSuperclass().getName().equals("groovy.lang.GroovyObjectSupport")) { bits |= IsGroovyObject; } } bits |= GroovyObjectInitialized; } return (bits & IsGroovyObject) != 0; } }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
tests/src/org/aspectj/systemtest/ajc171/Ajc171Tests.java
/******************************************************************************* * Copyright (c) 2012 Contributors * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Andy Clement - initial API and implementation *******************************************************************************/ package org.aspectj.systemtest.ajc171; import java.io.File; import junit.framework.Test; import org.aspectj.testing.XMLBasedAjcTestCase; /** * @author Andy Clement */ public class Ajc171Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testPublicITDFs_pr73507_1() {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
tests/src/org/aspectj/systemtest/ajc171/Ajc171Tests.java
runTest("public ITDfs - 1"); } public void testPublicITDFs_pr73507_2() { runTest("public ITDfs - 2"); } public void testPublicITDFs_pr73507_3() { runTest("public ITDfs - 3"); } public void testPublicITDFs_pr73507_4() { runTest("public ITDfs - 4"); } public void testPublicITDFs_pr73507_5() { runTest("public ITDfs - 5"); } public void testGenerics_384398() { runTest("generics itds"); } public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Ajc171Tests.class); } @Override protected File getSpecFile() { return new File("../tests/src/org/aspectj/systemtest/ajc171/ajc171.xml"); } }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
/* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * PARC initial implementation * Alexandre Vasseur @AspectJ ITDs * ******************************************************************/ package org.aspectj.weaver.bcel; import java.lang.reflect.Modifier; import java.util.ArrayList;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.classfile.ClassFormatException; import org.aspectj.apache.bcel.classfile.ConstantPool; import org.aspectj.apache.bcel.classfile.Signature; import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen; import org.aspectj.apache.bcel.generic.FieldGen; import org.aspectj.apache.bcel.generic.InstructionBranch; import org.aspectj.apache.bcel.generic.InstructionConstants; import org.aspectj.apache.bcel.generic.InstructionFactory; import org.aspectj.apache.bcel.generic.InstructionHandle; import org.aspectj.apache.bcel.generic.InstructionList; import org.aspectj.apache.bcel.generic.InvokeInstruction; import org.aspectj.apache.bcel.generic.Type; import org.aspectj.asm.AsmManager; import org.aspectj.asm.IProgramElement; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.ISourceLocation; import org.aspectj.bridge.Message; import org.aspectj.bridge.MessageUtil; import org.aspectj.bridge.WeaveMessage; import org.aspectj.bridge.context.CompilationAndWeavingContext; import org.aspectj.bridge.context.ContextToken; import org.aspectj.weaver.AjcMemberMaker; import org.aspectj.weaver.AnnotationAJ;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
import org.aspectj.weaver.AnnotationOnTypeMunger; import org.aspectj.weaver.BCException; import org.aspectj.weaver.ConcreteTypeMunger; import org.aspectj.weaver.Member; import org.aspectj.weaver.MemberUtils; import org.aspectj.weaver.MethodDelegateTypeMunger; import org.aspectj.weaver.NameMangler; import org.aspectj.weaver.NewConstructorTypeMunger; import org.aspectj.weaver.NewFieldTypeMunger; import org.aspectj.weaver.NewMemberClassTypeMunger; import org.aspectj.weaver.NewMethodTypeMunger; import org.aspectj.weaver.NewParentTypeMunger; import org.aspectj.weaver.PerObjectInterfaceTypeMunger; import org.aspectj.weaver.PrivilegedAccessMunger; import org.aspectj.weaver.ResolvedMember; import org.aspectj.weaver.ResolvedMemberImpl; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.ResolvedTypeMunger; import org.aspectj.weaver.Shadow; import org.aspectj.weaver.TypeVariableReference; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.WeaverMessages; import org.aspectj.weaver.WeaverStateInfo; import org.aspectj.weaver.World; import org.aspectj.weaver.model.AsmRelationshipProvider; import org.aspectj.weaver.patterns.DeclareAnnotation; import org.aspectj.weaver.patterns.Pointcut; public class BcelTypeMunger extends ConcreteTypeMunger { public BcelTypeMunger(ResolvedTypeMunger munger, ResolvedType aspectType) { super(munger, aspectType);
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} @Override public String toString() { return "(BcelTypeMunger " + getMunger() + ")"; } @Override public boolean shouldOverwrite() { return false; } public boolean munge(BcelClassWeaver weaver) { ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.MUNGING_WITH, this); boolean changed = false; boolean worthReporting = true; if (weaver.getWorld().isOverWeaving()) { WeaverStateInfo typeWeaverState = weaver.getLazyClassGen().getType().getWeaverState(); if (typeWeaverState != null && typeWeaverState.isAspectAlreadyApplied(getAspectType())) { return false; } } if (munger.getKind() == ResolvedTypeMunger.Field) { changed = mungeNewField(weaver, (NewFieldTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.Method) { changed = mungeNewMethod(weaver, (NewMethodTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.InnerClass) { changed = mungeNewMemberType(weaver, (NewMemberClassTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.MethodDelegate2) { changed = mungeMethodDelegate(weaver, (MethodDelegateTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.FieldHost) { changed = mungeFieldHost(weaver, (MethodDelegateTypeMunger.FieldHostTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.PerObjectInterface) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
changed = mungePerObjectInterface(weaver, (PerObjectInterfaceTypeMunger) munger); worthReporting = false; } else if (munger.getKind() == ResolvedTypeMunger.PerTypeWithinInterface) { changed = mungePerTypeWithinTransformer(weaver); worthReporting = false; } else if (munger.getKind() == ResolvedTypeMunger.PrivilegedAccess) { changed = mungePrivilegedAccess(weaver, (PrivilegedAccessMunger) munger); worthReporting = false; } else if (munger.getKind() == ResolvedTypeMunger.Constructor) { changed = mungeNewConstructor(weaver, (NewConstructorTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.Parent) { changed = mungeNewParent(weaver, (NewParentTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.AnnotationOnType) { changed = mungeNewAnnotationOnType(weaver, (AnnotationOnTypeMunger) munger); worthReporting = false; } else { throw new RuntimeException("unimplemented"); } if (changed && munger.changesPublicSignature()) { WeaverStateInfo info = weaver.getLazyClassGen().getOrCreateWeaverStateInfo(weaver.getReweavableMode()); info.addConcreteMunger(this); } if (changed && worthReporting) { ResolvedType declaringAspect = null; AsmManager model = ((BcelWorld) getWorld()).getModelAsAsmManager(); if (model != null) { if (munger instanceof NewParentTypeMunger) { NewParentTypeMunger nptMunger = (NewParentTypeMunger) munger; declaringAspect = nptMunger.getDeclaringType();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
if (declaringAspect.isParameterizedOrGenericType()) { declaringAspect = declaringAspect.getRawType(); } ResolvedType thisAspect = getAspectType(); AsmRelationshipProvider.addRelationship(model, weaver.getLazyClassGen().getType(), munger, thisAspect); if (!thisAspect.equals(declaringAspect)) { ResolvedType target = weaver.getLazyClassGen().getType(); ResolvedType newParent = nptMunger.getNewParent(); IProgramElement thisAspectNode = model.getHierarchy().findElementForType(thisAspect.getPackageName(), thisAspect.getClassName()); Map<String, List<String>> declareParentsMap = thisAspectNode.getDeclareParentsMap(); if (declareParentsMap == null) { declareParentsMap = new HashMap<String, List<String>>(); thisAspectNode.setDeclareParentsMap(declareParentsMap); } String tname = target.getName(); String pname = newParent.getName(); List<String> newparents = declareParentsMap.get(tname); if (newparents == null) { newparents = new ArrayList<String>(); declareParentsMap.put(tname, newparents); } newparents.add(pname); AsmRelationshipProvider.addRelationship(model, weaver.getLazyClassGen().getType(), munger, declaringAspect); } } else { declaringAspect = getAspectType();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
AsmRelationshipProvider.addRelationship(model, weaver.getLazyClassGen().getType(), munger, declaringAspect); } } } if (changed && worthReporting && munger != null && !weaver.getWorld().getMessageHandler().isIgnoring(IMessage.WEAVEINFO)) { String tName = weaver.getLazyClassGen().getType().getSourceLocation().getSourceFile().getName(); if (tName.indexOf("no debug info available") != -1) { tName = "no debug info available"; } else { tName = getShortname(weaver.getLazyClassGen().getType().getSourceLocation().getSourceFile().getPath()); } String fName = getShortname(getAspectType().getSourceLocation().getSourceFile().getPath()); if (munger.getKind().equals(ResolvedTypeMunger.Parent)) { NewParentTypeMunger parentTM = (NewParentTypeMunger) munger; if (parentTM.isMixin()) { weaver.getWorld() .getMessageHandler() .handleMessage( WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_MIXIN, new String[] { parentTM.getNewParent().getName(), fName, weaver.getLazyClassGen().getType().getName(), tName }, weaver.getLazyClassGen().getClassName(), getAspectType().getName())); } else { if (parentTM.getNewParent().isInterface()) { weaver.getWorld() .getMessageHandler() .handleMessage( WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_DECLAREPARENTSIMPLEMENTS,
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
new String[] { weaver.getLazyClassGen().getType().getName(), tName, parentTM.getNewParent().getName(), fName }, weaver.getLazyClassGen() .getClassName(), getAspectType().getName())); } else { weaver.getWorld() .getMessageHandler() .handleMessage( WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_DECLAREPARENTSEXTENDS, new String[] { weaver.getLazyClassGen().getType().getName(), tName, parentTM.getNewParent().getName(), fName })); } } } else if (munger.getKind().equals(ResolvedTypeMunger.FieldHost)) { } else { ResolvedMember declaredSig = munger.getSignature(); String fromString = fName + ":'" + declaredSig + "'"; String kindString = munger.getKind().toString().toLowerCase(); if (kindString.equals("innerclass")) { kindString = "member class"; fromString = fName; } weaver.getWorld() .getMessageHandler() .handleMessage( WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ITD, new String[] {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
weaver.getLazyClassGen().getType().getName(), tName, kindString, getAspectType().getName(), fromString }, weaver.getLazyClassGen().getClassName(), getAspectType().getName())); } } CompilationAndWeavingContext.leavingPhase(tok); return changed; } private String getShortname(String path) { int takefrom = path.lastIndexOf('/'); if (takefrom == -1) { takefrom = path.lastIndexOf('\\'); } return path.substring(takefrom + 1); } private boolean mungeNewAnnotationOnType(BcelClassWeaver weaver, AnnotationOnTypeMunger munger) { try { BcelAnnotation anno = (BcelAnnotation) munger.getNewAnnotation(); weaver.getLazyClassGen().addAnnotation(anno.getBcelAnnotation()); } catch (ClassCastException cce) { throw new IllegalStateException("DiagnosticsFor318237: The typemunger "+munger+" contains an annotation of type "+ munger.getNewAnnotation().getClass().getName()+" when it should be a BcelAnnotation",cce); } return true; } /** * For a long time, AspectJ did not allow binary weaving of declare parents. This restriction is now lifted but could do with * more testing! */ private boolean mungeNewParent(BcelClassWeaver weaver, NewParentTypeMunger typeTransformer) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
LazyClassGen newParentTarget = weaver.getLazyClassGen(); ResolvedType newParent = typeTransformer.getNewParent(); boolean performChange = true; performChange = enforceDecpRule1_abstractMethodsImplemented(weaver, typeTransformer.getSourceLocation(), newParentTarget, newParent); performChange = enforceDecpRule2_cantExtendFinalClass(weaver, typeTransformer.getSourceLocation(), newParentTarget, newParent) && performChange; List<ResolvedMember> methods = newParent.getMethodsWithoutIterator(false, true, false); for (ResolvedMember method : methods) { if (!method.getName().equals("<init>")) { LazyMethodGen subMethod = findMatchingMethod(newParentTarget, method); if (subMethod != null && !subMethod.isBridgeMethod()) { if (!(subMethod.isSynthetic() && method.isSynthetic())) { if (!(subMethod.isStatic() && subMethod.getName().startsWith("access$"))) { performChange = enforceDecpRule3_visibilityChanges(weaver, newParent, method, subMethod) && performChange; performChange = enforceDecpRule4_compatibleReturnTypes(weaver, method, subMethod) && performChange; performChange = enforceDecpRule5_cantChangeFromStaticToNonstatic(weaver, typeTransformer.getSourceLocation(), method, subMethod) && performChange; } } } } } if (!performChange) { return false;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} if (newParent.isClass()) { if (!attemptToModifySuperCalls(weaver, newParentTarget, newParent)) { return false; } newParentTarget.setSuperClass(newParent); } else { newParentTarget.addInterface(newParent, getSourceLocation()); } return true; } /** * Rule 1: For the declare parents to be allowed, the target type must override and implement inherited abstract methods (if the * type is not declared abstract) */ private boolean enforceDecpRule1_abstractMethodsImplemented(BcelClassWeaver weaver, ISourceLocation mungerLoc, LazyClassGen newParentTarget, ResolvedType newParent) { if (newParentTarget.isAbstract() || newParentTarget.isInterface()) { return true; } boolean ruleCheckingSucceeded = true; List<ResolvedMember> newParentMethods = newParent.getMethodsWithoutIterator(false, true, false); for (ResolvedMember newParentMethod : newParentMethods) { String newParentMethodName = newParentMethod.getName(); if (newParentMethod.isAbstract() && !newParentMethodName.startsWith("ajc$interField")) { ResolvedMember discoveredImpl = null;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
List<ResolvedMember> targetMethods = newParentTarget.getType().getMethodsWithoutIterator(false, true, false); for (ResolvedMember targetMethod : targetMethods) { if (!targetMethod.isAbstract() && targetMethod.getName().equals(newParentMethodName)) { String newParentMethodSig = newParentMethod.getParameterSignature(); String targetMethodSignature = targetMethod.getParameterSignature(); if (targetMethodSignature.equals(newParentMethodSig)) { discoveredImpl = targetMethod; } else { if (targetMethod.hasBackingGenericMember() && targetMethod.getBackingGenericMember().getParameterSignature().equals(newParentMethodSig)) { discoveredImpl = targetMethod; } else if (newParentMethod.hasBackingGenericMember()) { if (newParentMethod.getBackingGenericMember().getParameterSignature().equals(targetMethodSignature)) { discoveredImpl = targetMethod; } } } if (discoveredImpl != null) { break; } } } if (discoveredImpl == null) { boolean satisfiedByITD = false; for (ConcreteTypeMunger m : newParentTarget.getType().getInterTypeMungersIncludingSupers()) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
if (m.getMunger() != null && m.getMunger().getKind() == ResolvedTypeMunger.Method) { ResolvedMember sig = m.getSignature(); if (!Modifier.isAbstract(sig.getModifiers())) { if (m.isTargetTypeParameterized()) { ResolvedType genericOnType = getWorld().resolve(sig.getDeclaringType()).getGenericType(); m = m.parameterizedFor(newParent.discoverActualOccurrenceOfTypeInHierarchy(genericOnType)); sig = m.getSignature(); } if (ResolvedType.matches( AjcMemberMaker.interMethod(sig, m.getAspectType(), sig.getDeclaringType().resolve(weaver.getWorld()).isInterface()), newParentMethod)) { satisfiedByITD = true; } } } else if (m.getMunger() != null && m.getMunger().getKind() == ResolvedTypeMunger.MethodDelegate2) { satisfiedByITD = true; } } if (!satisfiedByITD) { error(weaver, "The type " + newParentTarget.getName() + " must implement the inherited abstract method " + newParentMethod.getDeclaringType() + "." + newParentMethodName + newParentMethod.getParameterSignature(), newParentTarget.getType().getSourceLocation(), new ISourceLocation[] { newParentMethod.getSourceLocation(), mungerLoc }); ruleCheckingSucceeded = false; }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} } } return ruleCheckingSucceeded; } /** * Rule 2. Can't extend final types */ private boolean enforceDecpRule2_cantExtendFinalClass(BcelClassWeaver weaver, ISourceLocation transformerLoc, LazyClassGen targetType, ResolvedType newParent) { if (newParent.isFinal()) { error(weaver, "Cannot make type " + targetType.getName() + " extend final class " + newParent.getName(), targetType .getType().getSourceLocation(), new ISourceLocation[] { transformerLoc }); return false; } return true; } /** * Rule 3. Can't narrow visibility of methods when overriding */ private boolean enforceDecpRule3_visibilityChanges(BcelClassWeaver weaver, ResolvedType newParent, ResolvedMember superMethod, LazyMethodGen subMethod) { boolean cont = true; if (Modifier.isPublic(superMethod.getModifiers())) { if (subMethod.isProtected() || subMethod.isDefault() || subMethod.isPrivate()) { weaver.getWorld() .getMessageHandler() .handleMessage( MessageUtil.error("Cannot reduce the visibility of the inherited method '" + superMethod + "' from " + newParent.getName(), superMethod.getSourceLocation()));
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
cont = false; } } else if (Modifier.isProtected(superMethod.getModifiers())) { if (subMethod.isDefault() || subMethod.isPrivate()) { weaver.getWorld() .getMessageHandler() .handleMessage( MessageUtil.error("Cannot reduce the visibility of the inherited method '" + superMethod + "' from " + newParent.getName(), superMethod.getSourceLocation())); cont = false; } } else if (superMethod.isDefault()) { if (subMethod.isPrivate()) { weaver.getWorld() .getMessageHandler() .handleMessage( MessageUtil.error("Cannot reduce the visibility of the inherited method '" + superMethod + "' from " + newParent.getName(), superMethod.getSourceLocation())); cont = false; } } return cont; } /** * Rule 4. Can't have incompatible return types */ private boolean enforceDecpRule4_compatibleReturnTypes(BcelClassWeaver weaver, ResolvedMember superMethod, LazyMethodGen subMethod) { boolean cont = true; String superReturnTypeSig = superMethod.getGenericReturnType().getSignature();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
String subReturnTypeSig = subMethod.getGenericReturnTypeSignature(); superReturnTypeSig = superReturnTypeSig.replace('.', '/'); subReturnTypeSig = subReturnTypeSig.replace('.', '/'); if (!superReturnTypeSig.equals(subReturnTypeSig)) { ResolvedType subType = weaver.getWorld().resolve(subMethod.getReturnType()); ResolvedType superType = weaver.getWorld().resolve(superMethod.getReturnType()); if (!superType.isAssignableFrom(subType)) { weaver.getWorld() .getMessageHandler() .handleMessage( MessageUtil.error("The return type is incompatible with " + superMethod.getDeclaringType() + "." + superMethod.getName() + superMethod.getParameterSignature(), subMethod.getSourceLocation())); cont = false; } } return cont; } /** * Rule5. Method overrides can't change the staticality (word?) - you can't override and make an instance method static or * override and make a static method an instance method. */ private boolean enforceDecpRule5_cantChangeFromStaticToNonstatic(BcelClassWeaver weaver, ISourceLocation mungerLoc,
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
ResolvedMember superMethod, LazyMethodGen subMethod) { boolean superMethodStatic = Modifier.isStatic(superMethod.getModifiers()); if (superMethodStatic && !subMethod.isStatic()) { error(weaver, "This instance method " + subMethod.getName() + subMethod.getParameterSignature() + " cannot override the static method from " + superMethod.getDeclaringType().getName(), subMethod.getSourceLocation(), new ISourceLocation[] { mungerLoc }); return false; } else if (!superMethodStatic && subMethod.isStatic()) { error(weaver, "The static method " + subMethod.getName() + subMethod.getParameterSignature() + " cannot hide the instance method from " + superMethod.getDeclaringType().getName(), subMethod.getSourceLocation(), new ISourceLocation[] { mungerLoc }); return false; } return true; } public void error(BcelClassWeaver weaver, String text, ISourceLocation primaryLoc, ISourceLocation[] extraLocs) { IMessage msg = new Message(text, primaryLoc, true, extraLocs); weaver.getWorld().getMessageHandler().handleMessage(msg); } /** * Search the specified type for a particular method - do not use the return value in the comparison as it is not considered for * overriding. */ private LazyMethodGen findMatchingMethod(LazyClassGen type, ResolvedMember searchMethod) { String searchName = searchMethod.getName(); String searchSig = searchMethod.getParameterSignature(); for (LazyMethodGen method : type.getMethodGens()) { if (method.getName().equals(searchName) && method.getParameterSignature().equals(searchSig)) { return method; }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} return null; } /** * The main part of implementing declare parents extends. Modify super ctor calls to target the new type. */ public boolean attemptToModifySuperCalls(BcelClassWeaver weaver, LazyClassGen newParentTarget, ResolvedType newParent) { ResolvedType currentParentType = newParentTarget.getSuperClass(); if (currentParentType.getGenericType() != null) { currentParentType = currentParentType.getGenericType(); } String currentParent = currentParentType.getName(); if (newParent.getGenericType() != null) { newParent = newParent.getGenericType(); } List<LazyMethodGen> mgs = newParentTarget.getMethodGens(); for (LazyMethodGen aMethod : mgs) { if (LazyMethodGen.isConstructor(aMethod)) { InstructionList insList = aMethod.getBody(); InstructionHandle handle = insList.getStart(); while (handle != null) { if (handle.getInstruction().opcode == Constants.INVOKESPECIAL) { ConstantPool cpg = newParentTarget.getConstantPool(); InvokeInstruction invokeSpecial = (InvokeInstruction) handle.getInstruction(); if (invokeSpecial.getClassName(cpg).equals(currentParent) && invokeSpecial.getMethodName(cpg).equals("<init>")) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
ResolvedMember newCtor = getConstructorWithSignature(newParent, invokeSpecial.getSignature(cpg)); if (newCtor == null) { boolean satisfiedByITDC = false; for (Iterator<ConcreteTypeMunger> ii = newParentTarget.getType() .getInterTypeMungersIncludingSupers().iterator(); ii.hasNext() && !satisfiedByITDC;) { ConcreteTypeMunger m = ii.next(); if (m.getMunger() instanceof NewConstructorTypeMunger) { if (m.getSignature().getSignature().equals(invokeSpecial.getSignature(cpg))) { satisfiedByITDC = true; } } } if (!satisfiedByITDC) { String csig = createReadableCtorSig(newParent, cpg, invokeSpecial); weaver.getWorld() .getMessageHandler() .handleMessage( MessageUtil.error( "Unable to modify hierarchy for " + newParentTarget.getClassName() + " - the constructor " + csig + " is missing", this.getSourceLocation())); return false; } } int idx = cpg.addMethodref(newParent.getName(), invokeSpecial.getMethodName(cpg), invokeSpecial.getSignature(cpg)); invokeSpecial.setIndex(idx); }
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} handle = handle.getNext(); } } } return true; } /** * Creates a nice signature for the ctor, something like "(int,Integer,String)" */ private String createReadableCtorSig(ResolvedType newParent, ConstantPool cpg, InvokeInstruction invokeSpecial) { StringBuffer sb = new StringBuffer(); Type[] ctorArgs = invokeSpecial.getArgumentTypes(cpg); sb.append(newParent.getClassName()); sb.append("("); for (int i = 0; i < ctorArgs.length; i++) { String argtype = ctorArgs[i].toString(); if (argtype.lastIndexOf(".") != -1) { sb.append(argtype.substring(argtype.lastIndexOf(".") + 1)); } else { sb.append(argtype); } if (i + 1 < ctorArgs.length) { sb.append(","); } } sb.append(")"); return sb.toString(); } private ResolvedMember getConstructorWithSignature(ResolvedType type, String searchSig) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
for (ResolvedMember method : type.getDeclaredJavaMethods()) { if (MemberUtils.isConstructor(method)) { if (method.getSignature().equals(searchSig)) { return method; } } } return null; } private boolean mungePrivilegedAccess(BcelClassWeaver weaver, PrivilegedAccessMunger munger) { LazyClassGen gen = weaver.getLazyClassGen(); ResolvedMember member = munger.getMember(); ResolvedType onType = weaver.getWorld().resolve(member.getDeclaringType(), munger.getSourceLocation()); if (onType.isRawType()) { onType = onType.getGenericType(); } if (onType.equals(gen.getType())) { if (member.getKind() == Member.FIELD) { addFieldGetter(gen, member, AjcMemberMaker.privilegedAccessMethodForFieldGet(aspectType, member, munger.shortSyntax)); addFieldSetter(gen, member, AjcMemberMaker.privilegedAccessMethodForFieldSet(aspectType, member, munger.shortSyntax)); return true; } else if (member.getKind() == Member.METHOD) { addMethodDispatch(gen, member, AjcMemberMaker.privilegedAccessMethodForMethod(aspectType, member)); return true; } else if (member.getKind() == Member.CONSTRUCTOR) { for (Iterator<LazyMethodGen> i = gen.getMethodGens().iterator(); i.hasNext();) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
LazyMethodGen m = i.next(); if (m.getMemberView() != null && m.getMemberView().getKind() == Member.CONSTRUCTOR) { m.forcePublic(); } } return true; } else if (member.getKind() == Member.STATIC_INITIALIZATION) { gen.forcePublic(); return true; } else { throw new RuntimeException("unimplemented"); } } return false; } private void addFieldGetter(LazyClassGen gen, ResolvedMember field, ResolvedMember accessMethod) { LazyMethodGen mg = makeMethodGen(gen, accessMethod); InstructionList il = new InstructionList(); InstructionFactory fact = gen.getFactory(); if (Modifier.isStatic(field.getModifiers())) { il.append(fact.createFieldAccess(gen.getClassName(), field.getName(), BcelWorld.makeBcelType(field.getType()), Constants.GETSTATIC)); } else { il.append(InstructionConstants.ALOAD_0); il.append(fact.createFieldAccess(gen.getClassName(), field.getName(), BcelWorld.makeBcelType(field.getType()), Constants.GETFIELD));
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} il.append(InstructionFactory.createReturn(BcelWorld.makeBcelType(field.getType()))); mg.getBody().insert(il); gen.addMethodGen(mg, getSignature().getSourceLocation()); } private void addFieldSetter(LazyClassGen gen, ResolvedMember field, ResolvedMember accessMethod) { LazyMethodGen mg = makeMethodGen(gen, accessMethod); InstructionList il = new InstructionList(); InstructionFactory fact = gen.getFactory(); Type fieldType = BcelWorld.makeBcelType(field.getType()); if (Modifier.isStatic(field.getModifiers())) { il.append(InstructionFactory.createLoad(fieldType, 0)); il.append(fact.createFieldAccess(gen.getClassName(), field.getName(), fieldType, Constants.PUTSTATIC)); } else { il.append(InstructionConstants.ALOAD_0); il.append(InstructionFactory.createLoad(fieldType, 1)); il.append(fact.createFieldAccess(gen.getClassName(), field.getName(), fieldType, Constants.PUTFIELD)); } il.append(InstructionFactory.createReturn(Type.VOID)); mg.getBody().insert(il); gen.addMethodGen(mg, getSignature().getSourceLocation()); } private void addMethodDispatch(LazyClassGen gen, ResolvedMember method, ResolvedMember accessMethod) { LazyMethodGen mg = makeMethodGen(gen, accessMethod); InstructionList il = new InstructionList(); InstructionFactory fact = gen.getFactory(); Type[] paramTypes = BcelWorld.makeBcelTypes(method.getParameterTypes()); int pos = 0; if (!Modifier.isStatic(method.getModifiers())) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
il.append(InstructionConstants.ALOAD_0); pos++; } for (int i = 0, len = paramTypes.length; i < len; i++) { Type paramType = paramTypes[i]; il.append(InstructionFactory.createLoad(paramType, pos)); pos += paramType.getSize(); } il.append(Utility.createInvoke(fact, (BcelWorld) aspectType.getWorld(), method)); il.append(InstructionFactory.createReturn(BcelWorld.makeBcelType(method.getReturnType()))); mg.getBody().insert(il); gen.addMethodGen(mg); } protected LazyMethodGen makeMethodGen(LazyClassGen gen, ResolvedMember member) { try { Type returnType = BcelWorld.makeBcelType(member.getReturnType()); Type[] parameterTypes = BcelWorld.makeBcelTypes(member.getParameterTypes()); LazyMethodGen ret = new LazyMethodGen(member.getModifiers(), returnType, member.getName(), parameterTypes, UnresolvedType.getNames(member .getExceptions()), gen); return ret; } catch (ClassFormatException cfe) { throw new RuntimeException("Problem with makeMethodGen for method "+member.getName()+" in type "+gen.getName()+" ret="+member.getReturnType(),cfe); } } protected FieldGen makeFieldGen(LazyClassGen gen, ResolvedMember member) { return new FieldGen(member.getModifiers(), BcelWorld.makeBcelType(member.getReturnType()), member.getName(),
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
gen.getConstantPool()); } private boolean mungePerObjectInterface(BcelClassWeaver weaver, PerObjectInterfaceTypeMunger munger) { LazyClassGen gen = weaver.getLazyClassGen(); if (couldMatch(gen.getBcelObjectType(), munger.getTestPointcut())) { FieldGen fg = makeFieldGen(gen, AjcMemberMaker.perObjectField(gen.getType(), aspectType)); gen.addField(fg, getSourceLocation()); Type fieldType = BcelWorld.makeBcelType(aspectType); LazyMethodGen mg = new LazyMethodGen(Modifier.PUBLIC, fieldType, NameMangler.perObjectInterfaceGet(aspectType), new Type[0], new String[0], gen); InstructionList il = new InstructionList(); InstructionFactory fact = gen.getFactory(); il.append(InstructionConstants.ALOAD_0); il.append(fact.createFieldAccess(gen.getClassName(), fg.getName(), fieldType, Constants.GETFIELD)); il.append(InstructionFactory.createReturn(fieldType)); mg.getBody().insert(il); gen.addMethodGen(mg); LazyMethodGen mg1 = new LazyMethodGen(Modifier.PUBLIC, Type.VOID, NameMangler.perObjectInterfaceSet(aspectType), new Type[] { fieldType, }, new String[0], gen); InstructionList il1 = new InstructionList(); il1.append(InstructionConstants.ALOAD_0); il1.append(InstructionFactory.createLoad(fieldType, 1)); il1.append(fact.createFieldAccess(gen.getClassName(), fg.getName(), fieldType, Constants.PUTFIELD)); il1.append(InstructionFactory.createReturn(Type.VOID)); mg1.getBody().insert(il1); gen.addMethodGen(mg1); gen.addInterface(munger.getInterfaceType().resolve(weaver.getWorld()), getSourceLocation()); return true;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} else { return false; } } private boolean mungePerTypeWithinTransformer(BcelClassWeaver weaver) { LazyClassGen gen = weaver.getLazyClassGen(); FieldGen fg = makeFieldGen(gen, AjcMemberMaker.perTypeWithinField(gen.getType(), aspectType)); gen.addField(fg, getSourceLocation()); Type fieldType = BcelWorld.makeBcelType(aspectType); LazyMethodGen mg = new LazyMethodGen(Modifier.PUBLIC | Modifier.STATIC, fieldType, NameMangler.perTypeWithinLocalAspectOf(aspectType), new Type[0], new String[0], gen); InstructionList il = new InstructionList(); InstructionFactory fact = gen.getFactory(); il.append(fact.createFieldAccess(gen.getClassName(), fg.getName(), fieldType, Constants.GETSTATIC)); il.append(InstructionFactory.createReturn(fieldType)); mg.getBody().insert(il); gen.addMethodGen(mg); return true;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} private boolean couldMatch(BcelObjectType bcelObjectType, Pointcut pointcut) { return !bcelObjectType.isInterface(); } private boolean mungeNewMemberType(BcelClassWeaver classWeaver, NewMemberClassTypeMunger munger) { World world = classWeaver.getWorld(); ResolvedType onType = world.resolve(munger.getTargetType()); if (onType.isRawType()) { onType = onType.getGenericType(); } return onType.equals(classWeaver.getLazyClassGen().getType()); } private boolean mungeNewMethod(BcelClassWeaver classWeaver, NewMethodTypeMunger munger) { World world = classWeaver.getWorld(); ResolvedMember unMangledInterMethod = munger.getSignature().resolve(world); ResolvedMember interMethodBody = munger.getDeclaredInterMethodBody(aspectType, world); ResolvedMember interMethodDispatcher = munger.getDeclaredInterMethodDispatcher(aspectType, world); ResolvedMember memberHoldingAnyAnnotations = interMethodDispatcher; LazyClassGen classGen = classWeaver.getLazyClassGen(); ResolvedType onType = world.resolve(unMangledInterMethod.getDeclaringType(), munger.getSourceLocation()); if (onType.isRawType()) { onType = onType.getGenericType(); } if (onType.isAnnotation()) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
signalError(WeaverMessages.ITDM_ON_ANNOTATION_NOT_ALLOWED, classWeaver, onType); return false; } if (onType.isEnum()) { signalError(WeaverMessages.ITDM_ON_ENUM_NOT_ALLOWED, classWeaver, onType); return false; } boolean mungingInterface = classGen.isInterface(); boolean onInterface = onType.isInterface(); if (onInterface && classGen.getLazyMethodGen(unMangledInterMethod.getName(), unMangledInterMethod.getSignature(), true) != null) { return false; } if (onType.equals(classGen.getType())) { ResolvedMember mangledInterMethod = AjcMemberMaker.interMethod(unMangledInterMethod, aspectType, onInterface); LazyMethodGen newMethod = makeMethodGen(classGen, mangledInterMethod); if (mungingInterface) { newMethod.setAccessFlags(Modifier.PUBLIC | Modifier.ABSTRACT); } if (classWeaver.getWorld().isInJava5Mode()) { AnnotationAJ annotationsOnRealMember[] = null;
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
ResolvedType toLookOn = aspectType; if (aspectType.isRawType()) { toLookOn = aspectType.getGenericType(); } ResolvedMember realMember = getRealMemberForITDFromAspect(toLookOn, memberHoldingAnyAnnotations, false); if (realMember == null) { } else { annotationsOnRealMember = realMember.getAnnotations(); } Set<ResolvedType> addedAnnotations = new HashSet<ResolvedType>(); if (annotationsOnRealMember != null) { for (AnnotationAJ anno : annotationsOnRealMember) { AnnotationGen a = ((BcelAnnotation) anno).getBcelAnnotation(); AnnotationGen ag = new AnnotationGen(a, classGen.getConstantPool(), true); newMethod.addAnnotation(new BcelAnnotation(ag, classWeaver.getWorld())); addedAnnotations.add(anno.getType()); } } if (realMember != null) { copyOverParameterAnnotations(newMethod, realMember); } List<DeclareAnnotation> allDecams = world.getDeclareAnnotationOnMethods();
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
for (DeclareAnnotation declareAnnotationMC : allDecams) { if (declareAnnotationMC.matches(unMangledInterMethod, world)) { AnnotationAJ annotation = declareAnnotationMC.getAnnotation(); if (!addedAnnotations.contains(annotation.getType())) { newMethod.addAnnotation(annotation); } } } } if (!onInterface && !Modifier.isAbstract(mangledInterMethod.getModifiers())) { InstructionList body = newMethod.getBody(); InstructionFactory fact = classGen.getFactory(); int pos = 0; if (!Modifier.isStatic(unMangledInterMethod.getModifiers())) { body.append(InstructionFactory.createThis()); pos++; } Type[] paramTypes = BcelWorld.makeBcelTypes(mangledInterMethod.getParameterTypes()); for (int i = 0, len = paramTypes.length; i < len; i++) { Type paramType = paramTypes[i]; body.append(InstructionFactory.createLoad(paramType, pos)); pos += paramType.getSize(); } body.append(Utility.createInvoke(fact, classWeaver.getWorld(), interMethodBody)); body.append(InstructionFactory.createReturn(BcelWorld.makeBcelType(mangledInterMethod.getReturnType()))); if (classWeaver.getWorld().isInJava5Mode()) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
createAnyBridgeMethodsForCovariance(classWeaver, munger, unMangledInterMethod, onType, classGen, paramTypes); } } else { } if (world.isInJava5Mode()) { String basicSignature = mangledInterMethod.getSignature(); String genericSignature = ((ResolvedMemberImpl) mangledInterMethod).getSignatureForAttribute(); if (!basicSignature.equals(genericSignature)) { newMethod.addAttribute(createSignatureAttribute(classGen.getConstantPool(), genericSignature)); } } classWeaver.addLazyMethodGen(newMethod); classWeaver.getLazyClassGen().warnOnAddedMethod(newMethod.getMethod(), getSignature().getSourceLocation()); addNeededSuperCallMethods(classWeaver, onType, munger.getSuperMethodsCalled()); return true; } else if (onInterface && !Modifier.isAbstract(unMangledInterMethod.getModifiers())) { if (!classGen.getType().isTopmostImplementor(onType)) { ResolvedType rtx = classGen.getType().getTopmostImplementor(onType); if (rtx == null) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
ResolvedType rt = classGen.getType(); if (rt.isInterface()) { ISourceLocation sloc = munger.getSourceLocation(); classWeaver .getWorld() .getMessageHandler() .handleMessage( MessageUtil.error( "ITD target " + rt.getName() + " is an interface but has been incorrectly determined to be the topmost implementor of " + onType.getName() + ". ITD is " + this.getSignature(), sloc)); } if (!onType.isAssignableFrom(rt)) { ISourceLocation sloc = munger.getSourceLocation(); classWeaver .getWorld() .getMessageHandler() .handleMessage( MessageUtil.error( "ITD target " + rt.getName() + " doesn't appear to implement " + onType.getName() + " why did we consider it the top most implementor? ITD is " + this.getSignature(), sloc)); } } else if (!rtx.isExposedToWeaver()) { ISourceLocation sLoc = munger.getSourceLocation(); classWeaver .getWorld() .getMessageHandler()
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
.handleMessage( MessageUtil.error(WeaverMessages.format(WeaverMessages.ITD_NON_EXPOSED_IMPLEMENTOR, rtx, getAspectType().getName()), (sLoc == null ? getAspectType().getSourceLocation() : sLoc))); } else { } return false; } else { ResolvedMember mangledInterMethod = AjcMemberMaker.interMethod(unMangledInterMethod, aspectType, false); LazyMethodGen mg = makeMethodGen(classGen, mangledInterMethod); if (classWeaver.getWorld().isInJava5Mode()) { AnnotationAJ annotationsOnRealMember[] = null; ResolvedType toLookOn = aspectType; if (aspectType.isRawType()) { toLookOn = aspectType.getGenericType(); } ResolvedMember realMember = getRealMemberForITDFromAspect(toLookOn, memberHoldingAnyAnnotations, false); if (realMember == null) { throw new BCException("Couldn't find ITD holder member '" + memberHoldingAnyAnnotations + "' on aspect " + aspectType); } annotationsOnRealMember = realMember.getAnnotations(); if (annotationsOnRealMember != null) { for (AnnotationAJ annotationX : annotationsOnRealMember) { AnnotationGen a = ((BcelAnnotation) annotationX).getBcelAnnotation(); AnnotationGen ag = new AnnotationGen(a, classWeaver.getLazyClassGen().getConstantPool(), true);
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
mg.addAnnotation(new BcelAnnotation(ag, classWeaver.getWorld())); } } copyOverParameterAnnotations(mg, realMember); } if (mungingInterface) { mg.setAccessFlags(Modifier.PUBLIC | Modifier.ABSTRACT); } Type[] paramTypes = BcelWorld.makeBcelTypes(mangledInterMethod.getParameterTypes()); Type returnType = BcelWorld.makeBcelType(mangledInterMethod.getReturnType()); InstructionList body = mg.getBody(); InstructionFactory fact = classGen.getFactory(); int pos = 0; if (!Modifier.isStatic(mangledInterMethod.getModifiers())) { body.append(InstructionFactory.createThis()); pos++; } for (int i = 0, len = paramTypes.length; i < len; i++) { Type paramType = paramTypes[i]; body.append(InstructionFactory.createLoad(paramType, pos)); pos += paramType.getSize(); } body.append(Utility.createInvoke(fact, classWeaver.getWorld(), interMethodBody)); Type t = BcelWorld.makeBcelType(interMethodBody.getReturnType()); if (!t.equals(returnType)) { body.append(fact.createCast(t, returnType));
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} body.append(InstructionFactory.createReturn(returnType)); mg.definingType = onType; if (world.isInJava5Mode()) { String basicSignature = mangledInterMethod.getSignature(); String genericSignature = ((ResolvedMemberImpl) mangledInterMethod).getSignatureForAttribute(); if (!basicSignature.equals(genericSignature)) { mg.addAttribute(createSignatureAttribute(classGen.getConstantPool(), genericSignature)); } } classWeaver.addOrReplaceLazyMethodGen(mg); addNeededSuperCallMethods(classWeaver, onType, munger.getSuperMethodsCalled()); createBridgeIfNecessary(classWeaver, munger, unMangledInterMethod, classGen); return true; } } else { return false; } } private void createBridgeIfNecessary(BcelClassWeaver classWeaver, NewMethodTypeMunger munger, ResolvedMember unMangledInterMethod, LazyClassGen classGen) { if (munger.getDeclaredSignature() != null) { boolean needsbridging = false; ResolvedMember mungerSignature = munger.getSignature(); ResolvedMember toBridgeTo = munger.getDeclaredSignature().parameterizedWith(null, mungerSignature.getDeclaringType().resolve(getWorld()), false, munger.getTypeVariableAliases()); if (!toBridgeTo.getReturnType().getErasureSignature().equals(mungerSignature.getReturnType().getErasureSignature())) {
386,049
Bug 386049 Error "must implement abstract inter-type declaration" even though build is fine
null
verified fixed
7c6e936
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-08-22T19:43:56Z
2012-07-26T13:40:00Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
needsbridging = true; } UnresolvedType[] originalParams = toBridgeTo.getParameterTypes(); UnresolvedType[] newParams = mungerSignature.getParameterTypes(); for (int ii = 0; ii < originalParams.length; ii++) { if (!originalParams[ii].getErasureSignature().equals(newParams[ii].getErasureSignature())) { needsbridging = true; } } if (needsbridging) { createBridge(classWeaver, unMangledInterMethod, classGen, toBridgeTo); } } } private void copyOverParameterAnnotations(LazyMethodGen receiverMethod, ResolvedMember donorMethod) { AnnotationAJ[][] pAnnos = donorMethod.getParameterAnnotations(); if (pAnnos != null) { int offset = receiverMethod.isStatic() ? 0 : 1; int param = 0; for (int i = offset; i < pAnnos.length; i++) { AnnotationAJ[] annosOnParam = pAnnos[i]; if (annosOnParam != null) { for (AnnotationAJ anno : annosOnParam) { receiverMethod.addParameterAnnotation(param, anno); } } param++; } } }