summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authorehilsdal <ehilsdal>2003-01-15 18:42:50 +0000
committerehilsdal <ehilsdal>2003-01-15 18:42:50 +0000
commit2a628ee26626c01816abfbd4770ef6fa6b279472 (patch)
tree7d3c355c4cf62c786041d2dfb3bb9be72ac42b08 /weaver
parentc65916fdf0155a2bc0d70dc3603ac0087666ab31 (diff)
downloadaspectj-2a628ee26626c01816abfbd4770ef6fa6b279472.tar.gz
aspectj-2a628ee26626c01816abfbd4770ef6fa6b279472.zip
adding another abstract/code guard
using NULL rather than empty list for abstract/native bodies
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java
index b7c46d50a..5703b5197 100644
--- a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java
+++ b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java
@@ -103,6 +103,9 @@ public final class LazyMethodGen {
if (!(m.isAbstract() || m.isNative()) && m.getCode() == null) {
throw new RuntimeException("bad non-abstract method with no code: " + m + " on " + enclosingClass);
}
+ if ((m.isAbstract() || m.isNative()) && m.getCode() != null) {
+ throw new RuntimeException("bad abstract method with code: " + m + " on " + enclosingClass);
+ }
MethodGen gen = new MethodGen(m, enclosingClass.getName(), enclosingClass.getConstantPoolGen());
this.memberView = new BcelMethod(enclosingClass.getType(), m);
this.accessFlags = gen.getAccessFlags();
@@ -657,6 +660,8 @@ public final class LazyMethodGen {
packBody(gen);
gen.setMaxLocals();
gen.setMaxStack();
+ } else {
+ gen.setInstructionList(null);
}
return gen;
}