From 2e61da9b5f617732b290471ef4476585987ccbc9 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 13 Apr 1999 10:44:04 +0000 Subject: [PATCH] gcp.putClassName/Type git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@570 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/bytecode/BytecodeInfo.java | 29 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/jode/jode/bytecode/BytecodeInfo.java b/jode/jode/bytecode/BytecodeInfo.java index 52f93b5..c4bbaf8 100644 --- a/jode/jode/bytecode/BytecodeInfo.java +++ b/jode/jode/bytecode/BytecodeInfo.java @@ -412,15 +412,19 @@ public class BytecodeInfo extends BinaryInfo implements Opcodes { case opc_new: case opc_checkcast: - case opc_instanceof: - instr.objData = cp.getClassName(input.readUnsignedShort()) - .replace('/','.'); + case opc_instanceof: { + String type = cp.getClassType(input.readUnsignedShort()); + if (opcode == opc_new && type.charAt(0) == '[') + throw new ClassFormatException + ("Can't create array with opc_new"); + instr.objData = type; if (Decompiler.isDebugging)/*XXX*/ Decompiler.err.print(" "+instr.objData); instr.length = 3; break; + } case opc_multianewarray: - instr.objData = cp.getClassName(input.readUnsignedShort()); + instr.objData = cp.getClassType(input.readUnsignedShort()); instr.intData = input.readUnsignedByte(); for (int i=0; i