Index: main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java =================================================================== --- main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java (revision 673228) +++ main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java (working copy) @@ -28,9 +28,18 @@ public class ByteCode extends ClassFileEntry { public static ByteCode getByteCode(int opcode) { - return new ByteCode(0xFF & opcode); + int byteOpcode = 0xFF & opcode; + if(ByteCodeForm.get(byteOpcode).hasNoOperand()) { + if(null == noArgByteCodes[byteOpcode]) { + noArgByteCodes[byteOpcode] = new ByteCode(byteOpcode); + } + return noArgByteCodes[byteOpcode]; + } + return new ByteCode(byteOpcode); } + private static ByteCode[] noArgByteCodes = new ByteCode[255]; + private final ByteCodeForm byteCodeForm; private ClassFileEntry[] nested;