summaryrefslogtreecommitdiff
path: root/src/cuchaz/enigma/bytecode/LocalVariableRenamer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/cuchaz/enigma/bytecode/LocalVariableRenamer.java')
-rw-r--r--src/cuchaz/enigma/bytecode/LocalVariableRenamer.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cuchaz/enigma/bytecode/LocalVariableRenamer.java b/src/cuchaz/enigma/bytecode/LocalVariableRenamer.java
index 53f207c..c87c25b 100644
--- a/src/cuchaz/enigma/bytecode/LocalVariableRenamer.java
+++ b/src/cuchaz/enigma/bytecode/LocalVariableRenamer.java
@@ -3,6 +3,7 @@ package cuchaz.enigma.bytecode;
3import javassist.CtBehavior; 3import javassist.CtBehavior;
4import javassist.CtClass; 4import javassist.CtClass;
5import javassist.bytecode.ByteArray; 5import javassist.bytecode.ByteArray;
6import javassist.bytecode.CodeAttribute;
6import javassist.bytecode.ConstPool; 7import javassist.bytecode.ConstPool;
7import javassist.bytecode.LocalVariableAttribute; 8import javassist.bytecode.LocalVariableAttribute;
8 9
@@ -13,7 +14,11 @@ public class LocalVariableRenamer {
13 for (CtBehavior behavior : c.getDeclaredBehaviors()) { 14 for (CtBehavior behavior : c.getDeclaredBehaviors()) {
14 15
15 // if there's a local variable table, just rename everything to v1, v2, v3, ... for now 16 // if there's a local variable table, just rename everything to v1, v2, v3, ... for now
16 LocalVariableAttribute table = (LocalVariableAttribute)behavior.getMethodInfo().getCodeAttribute().getAttribute(LocalVariableAttribute.tag); 17 CodeAttribute codeAttribute = behavior.getMethodInfo().getCodeAttribute();
18 if (codeAttribute == null) {
19 continue;
20 }
21 LocalVariableAttribute table = (LocalVariableAttribute)codeAttribute.getAttribute(LocalVariableAttribute.tag);
17 if (table == null) { 22 if (table == null) {
18 continue; 23 continue;
19 } 24 }