diff options
author | aclement <aclement> | 2006-05-23 10:37:22 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-05-23 10:37:22 +0000 |
commit | 7d99a23266ff26d1be0bd46af8ab7b3951cb9230 (patch) | |
tree | 1f3a44ca1e7a0b7df65be7b06863a59d56bcd7a6 /weaver | |
parent | 69e24e90d4fee7115ecbc8c7786915b1f741471b (diff) | |
download | aspectj-7d99a23266ff26d1be0bd46af8ab7b3951cb9230.tar.gz aspectj-7d99a23266ff26d1be0bd46af8ab7b3951cb9230.zip |
test and fix for first part of 126355
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java | 19 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java | 1 |
2 files changed, 13 insertions, 7 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java b/weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java index d48eaa8f8..d352731cd 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java @@ -480,12 +480,19 @@ public class BcelObjectType extends AbstractReferenceTypeDelegate { superClass = newParent; } else { ResolvedType[] oldInterfaceNames = getDeclaredInterfaces(); - int len = oldInterfaceNames.length; - ResolvedType[] newInterfaceNames = new ResolvedType[len+1]; - System.arraycopy(oldInterfaceNames, 0, newInterfaceNames, 0, len); - newInterfaceNames[len] = newParent; - - interfaces = newInterfaceNames; + int exists = -1; + for (int i = 0; i < oldInterfaceNames.length; i++) { + ResolvedType type = oldInterfaceNames[i]; + if (type.equals(newParent)) {exists = i;break; } + } + if (exists==-1) { + int len = oldInterfaceNames.length; + ResolvedType[] newInterfaceNames = new ResolvedType[len+1]; + System.arraycopy(oldInterfaceNames, 0, newInterfaceNames, 0, len); + newInterfaceNames[len] = newParent; + + interfaces = newInterfaceNames; + } } //System.err.println("javaClass: " + Arrays.asList(javaClass.getInterfaceNames()) + " super " + superclassName); //if (lazyClassGen != null) lazyClassGen.print(); diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java index 6533ea131..f03a1c835 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java @@ -581,7 +581,6 @@ public final class LazyClassGen { signature.append("<"); for (int i = 0; i < tVars.length; i++) { TypeVariable variable = tVars[i]; - if (i!=0) signature.append(","); signature.append(variable.getSignature()); } signature.append(">"); |