From cd35aa4baccef7769547fd0eb5f1127319888294 Mon Sep 17 00:00:00 2001 From: vromero Date: Fri, 28 Jun 2013 14:36:06 +0100 Subject: [PATCH] 8005552: c.s.t.javap.AttributeWriter.visitLocalVariableTable() uses incorrect format string Reviewed-by: mcimadamore --- src/share/classes/com/sun/tools/javap/AttributeWriter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/share/classes/com/sun/tools/javap/AttributeWriter.java b/src/share/classes/com/sun/tools/javap/AttributeWriter.java index 94aeb019..b292139c 100644 --- a/src/share/classes/com/sun/tools/javap/AttributeWriter.java +++ b/src/share/classes/com/sun/tools/javap/AttributeWriter.java @@ -365,8 +365,7 @@ public class AttributeWriter extends BasicWriter indent(+1); println("Start Length Slot Name Signature"); for (LocalVariableTable_attribute.Entry entry : attr.local_variable_table) { - Formatter formatter = new Formatter(); - println(formatter.format("%8d %7d %5d %5s %s", + println(String.format("%5d %7d %5d %5s %s", entry.start_pc, entry.length, entry.index, constantWriter.stringValue(entry.name_index), constantWriter.stringValue(entry.descriptor_index))); @@ -609,7 +608,8 @@ public class AttributeWriter extends BasicWriter public Void visit_append_frame(StackMapTable_attribute.append_frame frame, Void p) { printHeader(frame); println(" /* append */"); - println(" offset_delta = " + frame.offset_delta); + indent(+1); + println("offset_delta = " + frame.offset_delta); printMap("locals", frame.locals); return null; } -- GitLab