diff --git a/src/share/classes/com/sun/tools/javap/CodeWriter.java b/src/share/classes/com/sun/tools/javap/CodeWriter.java index 045084943953ec11773098be8908e9141aa1fd3e..4025bbfd7369e4a3184a8ebf7f38c768cb2a7c1d 100644 --- a/src/share/classes/com/sun/tools/javap/CodeWriter.java +++ b/src/share/classes/com/sun/tools/javap/CodeWriter.java @@ -140,7 +140,7 @@ class CodeWriter extends BasicWriter { } public Void visitConstantPoolRef(Instruction instr, int index, Void p) { - print("#" + index + ";"); + print("#" + index); tab(); print("// "); printConstant(index); @@ -148,7 +148,7 @@ class CodeWriter extends BasicWriter { } public Void visitConstantPoolRefAndValue(Instruction instr, int index, int value, Void p) { - print("#" + index + ", " + value + ";"); + print("#" + index + ", " + value); tab(); print("// "); printConstant(index); @@ -170,7 +170,7 @@ class CodeWriter extends BasicWriter { print("{ // " + npairs); indent(+1); for (int i = 0; i < npairs; i++) { - print("\n" + matches[i] + ": " + (pc + offsets[i]) + ";"); + print("\n" + matches[i] + ": " + (pc + offsets[i])); } print("\ndefault: " + (pc + default_) + " }"); indent(-1); @@ -182,7 +182,7 @@ class CodeWriter extends BasicWriter { print("{ //" + low + " to " + high); indent(+1); for (int i = 0; i < offsets.length; i++) { - print("\n" + (low + i) + ": " + (pc + offsets[i]) + ";"); + print("\n" + (low + i) + ": " + (pc + offsets[i])); } print("\ndefault: " + (pc + default_) + " }"); indent(-1); diff --git a/src/share/classes/com/sun/tools/javap/ConstantWriter.java b/src/share/classes/com/sun/tools/javap/ConstantWriter.java index 5a53beb33ed01502aa7bd5dcb49d1ba298b7257e..f514a897801fc515c5586bb5bed54691453538a3 100644 --- a/src/share/classes/com/sun/tools/javap/ConstantWriter.java +++ b/src/share/classes/com/sun/tools/javap/ConstantWriter.java @@ -62,69 +62,69 @@ public class ConstantWriter extends BasicWriter { protected void writeConstantPool(ConstantPool constant_pool) { ConstantPool.Visitor v = new ConstantPool.Visitor() { public Integer visitClass(CONSTANT_Class_info info, Void p) { - print("#" + info.name_index + ";"); + print("#" + info.name_index); tab(); println("// " + stringValue(info)); return 1; } public Integer visitDouble(CONSTANT_Double_info info, Void p) { - println(stringValue(info) + ";"); + println(stringValue(info)); return 2; } public Integer visitFieldref(CONSTANT_Fieldref_info info, Void p) { - print("#" + info.class_index + ".#" + info.name_and_type_index + ";"); + print("#" + info.class_index + ".#" + info.name_and_type_index); tab(); println("// " + stringValue(info)); return 1; } public Integer visitFloat(CONSTANT_Float_info info, Void p) { - println(stringValue(info) + ";"); + println(stringValue(info)); return 1; } public Integer visitInteger(CONSTANT_Integer_info info, Void p) { - println(stringValue(info) + ";"); + println(stringValue(info)); return 1; } public Integer visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) { - print("#" + info.class_index + ".#" + info.name_and_type_index + ";"); + print("#" + info.class_index + ".#" + info.name_and_type_index); tab(); println("// " + stringValue(info)); return 1; } public Integer visitLong(CONSTANT_Long_info info, Void p) { - println(stringValue(info) + ";"); + println(stringValue(info)); return 2; } public Integer visitNameAndType(CONSTANT_NameAndType_info info, Void p) { - print("#" + info.name_index + ":#" + info.type_index + ";"); + print("#" + info.name_index + ":#" + info.type_index); tab(); println("// " + stringValue(info)); return 1; } public Integer visitMethodref(CONSTANT_Methodref_info info, Void p) { - print("#" + info.class_index + ".#" + info.name_and_type_index + ";"); + print("#" + info.class_index + ".#" + info.name_and_type_index); tab(); println("// " + stringValue(info)); return 1; } public Integer visitString(CONSTANT_String_info info, Void p) { - print("#" + info.string_index + ";"); + print("#" + info.string_index); tab(); println("// " + stringValue(info)); return 1; } public Integer visitUtf8(CONSTANT_Utf8_info info, Void p) { - println(stringValue(info) + ";"); + println(stringValue(info)); return 1; } diff --git a/test/tools/javac/code/ArrayClone.java b/test/tools/javac/code/ArrayClone.java index 650f2604b8d3df125730bd26ed3d629c5b2903f5..6f5e2f35bcb34c3478a84909fb7197fac989d26a 100644 --- a/test/tools/javac/code/ArrayClone.java +++ b/test/tools/javac/code/ArrayClone.java @@ -48,7 +48,7 @@ public class ArrayClone { System.out.println(out); for (String line: out.split("\n")) { - String match = "[ \t]+[0-9]+:[ \t]+invokevirtual[ \t]+#[0-9]+;[ \t]+// Method \"\\[Ljava/lang/String;\".clone:\\(\\)Ljava/lang/Object;"; + String match = "[ \t]+[0-9]+:[ \t]+invokevirtual[ \t]+#[0-9]+[ \t]+// Method \"\\[Ljava/lang/String;\".clone:\\(\\)Ljava/lang/Object;"; if (line.matches(match)) return; }