diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2009-10-19 06:07:45 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2009-10-19 06:07:45 +0000 |
commit | 57fb7c93b2b5f41e5bfd82ec754a6c06b39c1080 (patch) | |
tree | af5ce512a9cfd812c700abb218474e3eddeabcd1 /src | |
parent | 4fe11acde798b9560ddcdf2ecd88fe06e87bcefd (diff) | |
download | javassist-57fb7c93b2b5f41e5bfd82ec754a6c06b39c1080.tar.gz javassist-57fb7c93b2b5f41e5bfd82ec754a6c06b39c1080.zip |
for fixing JIRA-95
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@499 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src')
-rw-r--r-- | src/main/javassist/bytecode/stackmap/MapMaker.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/javassist/bytecode/stackmap/MapMaker.java b/src/main/javassist/bytecode/stackmap/MapMaker.java index ab5c863a..6d2bf685 100644 --- a/src/main/javassist/bytecode/stackmap/MapMaker.java +++ b/src/main/javassist/bytecode/stackmap/MapMaker.java @@ -467,7 +467,7 @@ public class MapMaker extends Tracer { public StackMap toStackMap2(ConstPool cp, TypedBlock[] blocks) { StackMap.Writer writer = new StackMap.Writer(); - int n = blocks.length; + int n = blocks.length; // should be > 0 boolean[] effective = new boolean[n]; TypedBlock prev = blocks[0]; @@ -483,7 +483,10 @@ public class MapMaker extends Tracer { num++; } } - + + if (num == 0) + return null; + writer.write16bit(num); for (int i = 0; i < n; i++) if (effective[i]) |