changeset 2276:bdd699d7378d

8005552: c.s.t.javap.AttributeWriter.visitLocalVariableTable() uses incorrect format string Reviewed-by: mcimadamore
author vromero
date Fri, 28 Jun 2013 14:36:06 +0100
parents bb06c412d079
children 66147d50d8d6
files src/share/classes/com/sun/tools/javap/AttributeWriter.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javap/AttributeWriter.java	Fri Jun 28 13:20:44 2013 +0100
+++ b/src/share/classes/com/sun/tools/javap/AttributeWriter.java	Fri Jun 28 14:36:06 2013 +0100
@@ -365,8 +365,7 @@
         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 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;
         }