From 96ba0ab422d7f9747e93461524991cf5ceeb48c4 Mon Sep 17 00:00:00 2001 From: jeff Date: Thu, 19 Mar 2015 02:20:32 -0400 Subject: fix issue with naming method arguments and the local variable tables --- src/cuchaz/enigma/bytecode/MethodParametersAttribute.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cuchaz/enigma/bytecode/MethodParametersAttribute.java') diff --git a/src/cuchaz/enigma/bytecode/MethodParametersAttribute.java b/src/cuchaz/enigma/bytecode/MethodParametersAttribute.java index bf95956..27f5b9b 100644 --- a/src/cuchaz/enigma/bytecode/MethodParametersAttribute.java +++ b/src/cuchaz/enigma/bytecode/MethodParametersAttribute.java @@ -27,6 +27,7 @@ public class MethodParametersAttribute extends AttributeInfo { } public static void updateClass(MethodInfo info, List names) { + // add the names to the class const pool ConstPool constPool = info.getConstPool(); List parameterNameIndices = new ArrayList(); @@ -44,7 +45,7 @@ public class MethodParametersAttribute extends AttributeInfo { private static byte[] writeStruct(List parameterNameIndices) { // JVM 8 Spec says the struct looks like this: - // http://cr.openjdk.java.net/~mr/se/8/java-se-8-fr-spec-01/java-se-8-jvms-fr-diffs.pdf + // http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.24 // uint8 num_params // for each param: // uint16 name_index -> points to UTF8 entry in constant pool, or 0 for no entry -- cgit v1.2.3