diff options
author | jhugunin <jhugunin> | 2003-04-10 22:20:14 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2003-04-10 22:20:14 +0000 |
commit | 808bae83b3d5f37de4b39a2380db2782919a5f8a (patch) | |
tree | 576a779c6662eee340976c3be03cf7e8fb9c1fab /weaver | |
parent | af3c9f96769fd9a517f688e64706903dca63ade9 (diff) | |
download | aspectj-808bae83b3d5f37de4b39a2380db2782919a5f8a.tar.gz aspectj-808bae83b3d5f37de4b39a2380db2782919a5f8a.zip |
test and fix for
Bugzilla Bug 36046
inter-type declaration bug with abstract classes
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java | 7 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java | 2 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java | 10 |
3 files changed, 14 insertions, 5 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java index 79eb5f29c..4cb41ad1c 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java @@ -220,7 +220,12 @@ class BcelClassWeaver implements IClassWeaver { private boolean alreadyDefined(LazyClassGen clazz, LazyMethodGen mg) { for (Iterator i = clazz.getMethodGens().iterator(); i.hasNext(); ) { - if (signaturesMatch(mg, (LazyMethodGen)i.next())) { + LazyMethodGen existing = (LazyMethodGen)i.next(); + if (signaturesMatch(mg, existing)) { + if (!mg.isAbstract() && existing.isAbstract()) { + i.remove(); + return false; + } return true; } } diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java index 4c6308d01..39f3427e9 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java @@ -147,7 +147,7 @@ public final class LazyClassGen { } public List getMethodGens() { - return Collections.unmodifiableList(methodGens); + return methodGens; //???Collections.unmodifiableList(methodGens); } diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java index 7703774f1..adf0c953a 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java @@ -594,9 +594,13 @@ public final class LazyMethodGen { return prevLine; } - public boolean isStatic() { - return Modifier.isStatic(getAccessFlags()); - } + public boolean isStatic() { + return Modifier.isStatic(getAccessFlags()); + } + + public boolean isAbstract() { + return Modifier.isAbstract(getAccessFlags()); + } public void addExceptionHandler( InstructionHandle start, |