From a8d6ca1e9a780051274a4854f222093c885ebc27 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 2 Jun 1999 20:22:59 +0000 Subject: [PATCH] missed a white method bug fixes git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@828 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/obfuscator/ConstantRuntimeEnvironment.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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");