diff options
author | ehilsdal <ehilsdal> | 2003-01-15 18:42:50 +0000 |
---|---|---|
committer | ehilsdal <ehilsdal> | 2003-01-15 18:42:50 +0000 |
commit | 2a628ee26626c01816abfbd4770ef6fa6b279472 (patch) | |
tree | 7d3c355c4cf62c786041d2dfb3bb9be72ac42b08 /weaver | |
parent | c65916fdf0155a2bc0d70dc3603ac0087666ab31 (diff) | |
download | aspectj-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.java | 5 |
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; } |