diff --git a/jode/jode/obfuscator/ConstantRuntimeEnvironment.java b/jode/jode/obfuscator/ConstantRuntimeEnvironment.java index cafbc32..93b3d19 100644 --- a/jode/jode/obfuscator/ConstantRuntimeEnvironment.java +++ b/jode/jode/obfuscator/ConstantRuntimeEnvironment.java @@ -61,6 +61,8 @@ public class ConstantRuntimeEnvironment extends SimpleRuntimeEnvironment { addWhite(Reference.getReference ("Ljava/lang/StringBuffer;", "", "(Ljava/lang/String;)V")); + addWhite(Reference.getReference + ("Ljava/lang/StringBuffer;", "", "()V")); addWhite(Reference.getReference ("Ljava/lang/StringBuffer;", "append", "(Ljava/lang/String;)Ljava/lang/StringBuffer;")); @@ -282,15 +284,16 @@ public class ConstantRuntimeEnvironment extends SimpleRuntimeEnvironment { throw new InterpreterException ("Class "+ex.getMessage()+" not found"); } - return obj != null && !clazz.isInstance(obj); + return obj != null && clazz.isInstance(obj); } public Object newArray(String type, int[] dimensions) throws InterpreterException, NegativeArraySizeException { - if (type.length() == 1) { + if (type.length() == dimensions.length + 1) { Class clazz; try { - clazz = Class.forName(type); + clazz = Type.tType(type.substring(dimensions.length)) + .getTypeClass(); } catch (ClassNotFoundException ex) { throw new InterpreterException ("Class "+ex.getMessage()+" not found");