aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/bytecode/stackmap/MapMaker.java
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2012-11-15 15:06:33 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2012-11-15 15:06:33 +0000
commit226a8f53e5d26d8a4a5aefcfd09340bbc9caf7ce (patch)
treecc37a3cbb8524ff7cee6acb4fcf366c78bb4bdc8 /src/main/javassist/bytecode/stackmap/MapMaker.java
parentc135586d0914166b9ec51eef0e5dea07be8c7e95 (diff)
downloadjavassist-226a8f53e5d26d8a4a5aefcfd09340bbc9caf7ce.tar.gz
javassist-226a8f53e5d26d8a4a5aefcfd09340bbc9caf7ce.zip
fixed JASSIST-177
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@686 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/bytecode/stackmap/MapMaker.java')
-rw-r--r--src/main/javassist/bytecode/stackmap/MapMaker.java22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/main/javassist/bytecode/stackmap/MapMaker.java b/src/main/javassist/bytecode/stackmap/MapMaker.java
index 3c96a36a..9777ca20 100644
--- a/src/main/javassist/bytecode/stackmap/MapMaker.java
+++ b/src/main/javassist/bytecode/stackmap/MapMaker.java
@@ -82,7 +82,7 @@ public class MapMaker extends Tracer {
/**
* Computes the stack map table of the given method and returns it.
* It returns null if the given method does not have to have a
- * stack map table.
+ * stack map table or it includes JSR.
*/
public static StackMapTable make(ClassPool classes, MethodInfo minfo)
throws BadBytecode
@@ -91,7 +91,14 @@ public class MapMaker extends Tracer {
if (ca == null)
return null;
- TypedBlock[] blocks = TypedBlock.makeBlocks(minfo, ca, true);
+ TypedBlock[] blocks;
+ try {
+ blocks = TypedBlock.makeBlocks(minfo, ca, true);
+ }
+ catch (BasicBlock.JsrBytecode e) {
+ return null;
+ }
+
if (blocks == null)
return null;
@@ -109,7 +116,7 @@ public class MapMaker extends Tracer {
/**
* Computes the stack map table for J2ME.
* It returns null if the given method does not have to have a
- * stack map table.
+ * stack map table or it includes JSR.
*/
public static StackMap make2(ClassPool classes, MethodInfo minfo)
throws BadBytecode
@@ -118,7 +125,14 @@ public class MapMaker extends Tracer {
if (ca == null)
return null;
- TypedBlock[] blocks = TypedBlock.makeBlocks(minfo, ca, true);
+ TypedBlock[] blocks;
+ try {
+ blocks = TypedBlock.makeBlocks(minfo, ca, true);
+ }
+ catch (BasicBlock.JsrBytecode e) {
+ return null;
+ }
+
if (blocks == null)
return null;