return false;
}
boolean b = false;
- /* if (ignoreGenerics) {
- String myParameterSignature = getParameterSigWithBoundsRemoved();
- String candidateParameterSignature = candidateMatchImpl.getParameterSigWithBoundsRemoved();
- if (myParameterSignature.equals(candidateParameterSignature)) {
- b = true;
- } else {
- myParameterSignature = (hasBackingGenericMember() ? backingGenericMember.getParameterSignatureErased()
- : getParameterSignatureErased());
- candidateParameterSignature = (candidateMatchImpl.hasBackingGenericMember() ? candidateMatchImpl.backingGenericMember
- .getParameterSignatureErased()
- : candidateMatchImpl.getParameterSignatureErased());
- // System.out.println("my psig = " + myParameterSignature);
- // System.out.println("can psig = " + candidateParameterSignature);
- b = myParameterSignature.equals(candidateParameterSignature);
- }
+ /*
+ * if (ignoreGenerics) { String myParameterSignature = getParameterSigWithBoundsRemoved(); String
+ * candidateParameterSignature = candidateMatchImpl.getParameterSigWithBoundsRemoved(); if
+ * (myParameterSignature.equals(candidateParameterSignature)) { b = true; } else { myParameterSignature =
+ * (hasBackingGenericMember() ? backingGenericMember.getParameterSignatureErased() : getParameterSignatureErased());
+ * candidateParameterSignature = (candidateMatchImpl.hasBackingGenericMember() ? candidateMatchImpl.backingGenericMember
+ * .getParameterSignatureErased() : candidateMatchImpl.getParameterSignatureErased()); // System.out.println("my psig = " +
+ * myParameterSignature); // System.out.println("can psig = " + candidateParameterSignature); b =
+ * myParameterSignature.equals(candidateParameterSignature); } } else {
+ */
+ String myParameterSignature = getParameterSigWithBoundsRemoved();
+ String candidateParameterSignature = candidateMatchImpl.getParameterSigWithBoundsRemoved();
+ if (myParameterSignature.equals(candidateParameterSignature)) {
+ b = true;
} else {
-*/
- String myParameterSignature = getParameterSigWithBoundsRemoved();
- String candidateParameterSignature = candidateMatchImpl.getParameterSigWithBoundsRemoved();
- if (myParameterSignature.equals(candidateParameterSignature)) {
- b = true;
- } else {
- // try erasure
- myParameterSignature = getParameterSignatureErased();
- candidateParameterSignature = candidateMatchImpl.getParameterSignatureErased();
- // myParameterSignature = (hasBackingGenericMember() ? backingGenericMember.getParameterSignatureErased()
- // : getParameterSignatureErased());
- // candidateParameterSignature = (candidateMatchImpl.hasBackingGenericMember() ?
- // candidateMatchImpl.backingGenericMember
- // .getParameterSignatureErased() : candidateMatchImpl.getParameterSignatureErased());
- // System.out.println("my psig = " + myParameterSignature);
- // System.out.println("can psig = " + candidateParameterSignature);
- b = myParameterSignature.equals(candidateParameterSignature);
-// }
+ // try erasure
+ myParameterSignature = getParameterSignatureErased();
+ candidateParameterSignature = candidateMatchImpl.getParameterSignatureErased();
+ // myParameterSignature = (hasBackingGenericMember() ? backingGenericMember.getParameterSignatureErased()
+ // : getParameterSignatureErased());
+ // candidateParameterSignature = (candidateMatchImpl.hasBackingGenericMember() ?
+ // candidateMatchImpl.backingGenericMember
+ // .getParameterSignatureErased() : candidateMatchImpl.getParameterSignatureErased());
+ // System.out.println("my psig = " + myParameterSignature);
+ // System.out.println("can psig = " + candidateParameterSignature);
+ b = myParameterSignature.equals(candidateParameterSignature);
+ // }
}
// System.out.println("Checking param signatures: " + b);
return b;
public boolean isEquivalentTo(Object other) {
return this.equals(other);
}
+
+ public boolean isDefaultConstructor() {
+ return false;
+ }
}
}
}
if (!isDuplicateOfPreviousITD) {
- getWorld().getMessageHandler().handleMessage(
- MessageUtil.error(WeaverMessages.format(WeaverMessages.ITD_MEMBER_CONFLICT, munger
- .getAspectType().getName(), existingMember), munger.getSourceLocation()));
+ // b275032 - this is OK if it is the default ctor and that default ctor was generated
+ // at compile time, otherwise we cannot overwrite it
+ if (!(munger.getSignature().getName().equals("<init>") && existingMember.isDefaultConstructor())) {
+ getWorld().getMessageHandler().handleMessage(
+ MessageUtil.error(WeaverMessages.format(WeaverMessages.ITD_MEMBER_CONFLICT, munger
+ .getAspectType().getName(), existingMember), munger.getSourceLocation()));
+ }
}
}
}