diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java b/src/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java index 4f842157ac3ece0c7a41bec9fd60b21f8d3e2d21..c9bf9d30225adfb93eb640d1d291fc973baa05b4 100644 --- a/src/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java +++ b/src/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java @@ -1858,7 +1858,7 @@ public class ClassReader { break; case 'B': // pointer to CONSTANT_Byte av.visit(name, - new Byte((byte) readInt(items[readUnsignedShort(v)]))); + (byte) readInt(items[readUnsignedShort(v)])); v += 2; break; case 'Z': // pointer to CONSTANT_Boolean @@ -1868,13 +1868,13 @@ public class ClassReader { v += 2; break; case 'S': // pointer to CONSTANT_Short - av.visit(name, new Short( - (short) readInt(items[readUnsignedShort(v)]))); + av.visit(name, + (short) readInt(items[readUnsignedShort(v)])); v += 2; break; case 'C': // pointer to CONSTANT_Char - av.visit(name, new Character( - (char) readInt(items[readUnsignedShort(v)]))); + av.visit(name, + (char) readInt(items[readUnsignedShort(v)])); v += 2; break; case 's': // pointer to CONSTANT_Utf8 @@ -2498,13 +2498,13 @@ public class ClassReader { int index = items[item]; switch (b[index - 1]) { case ClassWriter.INT: - return new Integer(readInt(index)); + return readInt(index); case ClassWriter.FLOAT: - return new Float(Float.intBitsToFloat(readInt(index))); + return Float.intBitsToFloat(readInt(index)); case ClassWriter.LONG: - return new Long(readLong(index)); + return readLong(index); case ClassWriter.DOUBLE: - return new Double(Double.longBitsToDouble(readLong(index))); + return Double.longBitsToDouble(readLong(index)); case ClassWriter.CLASS: return Type.getObjectType(readUTF8(index, buf)); case ClassWriter.STR: diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/TypePath.java b/src/share/classes/jdk/internal/org/objectweb/asm/TypePath.java index b43a11d5a30c9b23b8df882613db46384533a267..31fe2bc6826aec6ea6c0138e26b9f76f6bec0326 100644 --- a/src/share/classes/jdk/internal/org/objectweb/asm/TypePath.java +++ b/src/share/classes/jdk/internal/org/objectweb/asm/TypePath.java @@ -181,6 +181,9 @@ public class TypePath { typeArg = typeArg * 10 + c - '0'; i += 1; } + if (i < n && typePath.charAt(i) == ';') { + i += 1; + } out.put11(TYPE_ARGUMENT, typeArg); } } @@ -193,7 +196,7 @@ public class TypePath { * ARRAY_ELEMENT} steps are represented with '[', {@link #INNER_TYPE * INNER_TYPE} steps with '.', {@link #WILDCARD_BOUND WILDCARD_BOUND} steps * with '*' and {@link #TYPE_ARGUMENT TYPE_ARGUMENT} steps with their type - * argument index in decimal form. + * argument index in decimal form followed by ';'. */ @Override public String toString() { @@ -211,7 +214,7 @@ public class TypePath { result.append('*'); break; case TYPE_ARGUMENT: - result.append(getStepArgument(i)); + result.append(getStepArgument(i)).append(';'); break; default: result.append('_'); diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/commons/GeneratorAdapter.java b/src/share/classes/jdk/internal/org/objectweb/asm/commons/GeneratorAdapter.java index 786a5b5365a3f27a4cd348abea485b50163e35aa..e198de78ce33f583de574e901c80a1950aa89128 100644 --- a/src/share/classes/jdk/internal/org/objectweb/asm/commons/GeneratorAdapter.java +++ b/src/share/classes/jdk/internal/org/objectweb/asm/commons/GeneratorAdapter.java @@ -408,7 +408,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { } else if (value >= Short.MIN_VALUE && value <= Short.MAX_VALUE) { mv.visitIntInsn(Opcodes.SIPUSH, value); } else { - mv.visitLdcInsn(new Integer(value)); + mv.visitLdcInsn(value); } } @@ -422,7 +422,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { if (value == 0L || value == 1L) { mv.visitInsn(Opcodes.LCONST_0 + (int) value); } else { - mv.visitLdcInsn(new Long(value)); + mv.visitLdcInsn(value); } } @@ -437,7 +437,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { if (bits == 0L || bits == 0x3f800000 || bits == 0x40000000) { // 0..2 mv.visitInsn(Opcodes.FCONST_0 + (int) value); } else { - mv.visitLdcInsn(new Float(value)); + mv.visitLdcInsn(value); } } @@ -452,7 +452,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { if (bits == 0L || bits == 0x3ff0000000000000L) { // +0.0d and 1.0d mv.visitInsn(Opcodes.DCONST_0 + (int) value); } else { - mv.visitLdcInsn(new Double(value)); + mv.visitLdcInsn(value); } } @@ -1647,11 +1647,13 @@ public class GeneratorAdapter extends LocalVariablesSorter { */ public void catchException(final Label start, final Label end, final Type exception) { + Label doCatch = new Label(); if (exception == null) { - mv.visitTryCatchBlock(start, end, mark(), null); + mv.visitTryCatchBlock(start, end, doCatch, null); } else { - mv.visitTryCatchBlock(start, end, mark(), + mv.visitTryCatchBlock(start, end, doCatch, exception.getInternalName()); } + mark(doCatch); } } diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java b/src/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java index 2c54ea475fd506466f484f3242f6220ba1716f85..2df144ef70c2ad65fa5bb0c757dd8eca56560625 100644 --- a/src/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java +++ b/src/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java @@ -737,7 +737,7 @@ public class InstructionAdapter extends MethodVisitor { } else if (cst >= Short.MIN_VALUE && cst <= Short.MAX_VALUE) { mv.visitIntInsn(Opcodes.SIPUSH, cst); } else { - mv.visitLdcInsn(new Integer(cst)); + mv.visitLdcInsn(cst); } } @@ -745,7 +745,7 @@ public class InstructionAdapter extends MethodVisitor { if (cst == 0L || cst == 1L) { mv.visitInsn(Opcodes.LCONST_0 + (int) cst); } else { - mv.visitLdcInsn(new Long(cst)); + mv.visitLdcInsn(cst); } } @@ -754,7 +754,7 @@ public class InstructionAdapter extends MethodVisitor { if (bits == 0L || bits == 0x3f800000 || bits == 0x40000000) { // 0..2 mv.visitInsn(Opcodes.FCONST_0 + (int) cst); } else { - mv.visitLdcInsn(new Float(cst)); + mv.visitLdcInsn(cst); } } @@ -763,7 +763,7 @@ public class InstructionAdapter extends MethodVisitor { if (bits == 0L || bits == 0x3ff0000000000000L) { // +0.0d and 1.0d mv.visitInsn(Opcodes.DCONST_0 + (int) cst); } else { - mv.visitLdcInsn(new Double(cst)); + mv.visitLdcInsn(cst); } } diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java b/src/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java index 51fcb4c46f6aa478fdeb679161b6e5e852922e7f..cd407fd80636218e16eaeffd5ba06ca30017708e 100644 --- a/src/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java +++ b/src/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java @@ -366,8 +366,7 @@ public class SerialVersionUIDAdder extends ClassVisitor { protected void addSVUID(long svuid) { FieldVisitor fv = super.visitField(Opcodes.ACC_FINAL - + Opcodes.ACC_STATIC, "serialVersionUID", "J", null, new Long( - svuid)); + + Opcodes.ACC_STATIC, "serialVersionUID", "J", null, svuid); if (fv != null) { fv.visitEnd(); } diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/tree/AnnotationNode.java b/src/share/classes/jdk/internal/org/objectweb/asm/tree/AnnotationNode.java index b67ea38591aaabf2c694321def2385c301490e09..1bb9925df04b2f26aaa3a1d8b332fc4eb16cfff5 100644 --- a/src/share/classes/jdk/internal/org/objectweb/asm/tree/AnnotationNode.java +++ b/src/share/classes/jdk/internal/org/objectweb/asm/tree/AnnotationNode.java @@ -247,11 +247,13 @@ public class AnnotationNode extends AnnotationVisitor { an.accept(av.visitAnnotation(name, an.desc)); } else if (value instanceof List) { AnnotationVisitor v = av.visitArray(name); - List array = (List) value; - for (int j = 0; j < array.size(); ++j) { - accept(v, null, array.get(j)); + if (v != null) { + List array = (List) value; + for (int j = 0; j < array.size(); ++j) { + accept(v, null, array.get(j)); + } + v.visitEnd(); } - v.visitEnd(); } else { av.visit(name, value); } diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/tree/LookupSwitchInsnNode.java b/src/share/classes/jdk/internal/org/objectweb/asm/tree/LookupSwitchInsnNode.java index b1daa382f674b0d6c12f6379de5e0e72e1ef0c9a..ab408b7480e54245a582760edff994f4620343f5 100644 --- a/src/share/classes/jdk/internal/org/objectweb/asm/tree/LookupSwitchInsnNode.java +++ b/src/share/classes/jdk/internal/org/objectweb/asm/tree/LookupSwitchInsnNode.java @@ -110,7 +110,7 @@ public class LookupSwitchInsnNode extends AbstractInsnNode { : labels.length); if (keys != null) { for (int i = 0; i < keys.length; ++i) { - this.keys.add(new Integer(keys[i])); + this.keys.add(keys[i]); } } if (labels != null) { diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/tree/MethodInsnNode.java b/src/share/classes/jdk/internal/org/objectweb/asm/tree/MethodInsnNode.java index 2f61df3b5175bf33823051e65bfede1b071966fe..cb84d4262d8cef2fbeb69205dcb98e3e73c5671e 100644 --- a/src/share/classes/jdk/internal/org/objectweb/asm/tree/MethodInsnNode.java +++ b/src/share/classes/jdk/internal/org/objectweb/asm/tree/MethodInsnNode.java @@ -160,6 +160,7 @@ public class MethodInsnNode extends AbstractInsnNode { @Override public void accept(final MethodVisitor mv) { mv.visitMethodInsn(opcode, owner, name, desc, itf); + acceptAnnotations(mv); } @Override diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java b/src/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java index 0716debae62106687c10df2b816abb202720d1f2..25673195f1ce75f47d5e3ec9941c8490301af83f 100644 --- a/src/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java +++ b/src/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java @@ -802,7 +802,7 @@ public class CheckMethodAdapter extends MethodVisitor { if (labels.get(label) != null) { throw new IllegalArgumentException("Already visited label"); } - labels.put(label, new Integer(insnCount)); + labels.put(label, insnCount); super.visitLabel(label); } diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java b/src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java index c210e2c4033253c48753fe144938cdb2e3160f7f..b8e1cd1f12ff8634b85cf76ba0238d907335f6eb 100644 --- a/src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java +++ b/src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java @@ -732,7 +732,7 @@ public class Textifier extends Printer { Textifier t = createTextifier(); text.add(t.getText()); text.add(visible ? ") // parameter " : ") // invisible, parameter "); - text.add(new Integer(parameter)); + text.add(parameter); text.add("\n"); return t; } diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/version.txt b/src/share/classes/jdk/internal/org/objectweb/asm/version.txt index d93a6c4b4fdeef658199f57c498d9e8a9275b061..5ba3a332b4803ddffee7eedd02db950e6a11e379 100644 --- a/src/share/classes/jdk/internal/org/objectweb/asm/version.txt +++ b/src/share/classes/jdk/internal/org/objectweb/asm/version.txt @@ -1,12 +1,12 @@ Path: . -Working Copy Root Path: /hudson/jobs/objectweb-pull/workspace/asm-svn-2014-06-19 +Working Copy Root Path: /hudson/jobs/objectweb-init/workspace/asm-svn-2014-10-15 URL: file:///svnroot/asm/trunk/asm Repository Root: file:///svnroot/asm Repository UUID: 271bd773-ee82-43a6-9b2b-1890ed8ce7f9 -Revision: 1750 +Revision: 1772 Node Kind: directory Schedule: normal -Last Changed Author: forax -Last Changed Rev: 1750 -Last Changed Date: 2014-06-06 00:31:02 +0200 (Fri, 06 Jun 2014) +Last Changed Author: ebruneton +Last Changed Rev: 1772 +Last Changed Date: 2014-09-06 09:13:07 +0200 (Sat, 06 Sep 2014)