6868553: 6867671 breaks some tests
authorjjg
Wed, 05 Aug 2009 07:43:50 -0700
changeset 3547 4471bb5983d1
parent 3546 00b2974fdf04
child 3548 fd92f0d28cb9
6868553: 6867671 breaks some tests Reviewed-by: mcimadamore
langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java
langtools/test/tools/javac/code/ArrayClone.java
langtools/test/tools/javap/4111861/T4111861.java
langtools/test/tools/javap/T4884240.java
langtools/test/tools/javap/T4975569.java
langtools/test/tools/javap/stackmap/T6271292.sh
--- a/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java	Tue Aug 04 17:26:41 2009 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java	Wed Aug 05 07:43:50 2009 -0700
@@ -329,7 +329,7 @@
             print("InnerClass");
         else
             print("InnerClasses");
-        println(": ");
+        println(":");
         indent(+1);
     }
 
--- a/langtools/test/tools/javac/code/ArrayClone.java	Tue Aug 04 17:26:41 2009 -0700
+++ b/langtools/test/tools/javac/code/ArrayClone.java	Wed Aug 05 07:43:50 2009 -0700
@@ -48,7 +48,7 @@
         System.out.println(out);
 
         for (String line: out.split("\n")) {
-            String match = "[ \t]+[0-9]+:[ \t]+invokevirtual[ \t]+#[0-9]+; //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;
         }
--- a/langtools/test/tools/javap/4111861/T4111861.java	Tue Aug 04 17:26:41 2009 -0700
+++ b/langtools/test/tools/javap/4111861/T4111861.java	Wed Aug 05 07:43:50 2009 -0700
@@ -89,7 +89,7 @@
             String line;
             while ((line = in.readLine()) != null) {
                 if (line.indexOf("public static final") > 0) {
-                    sb.append(line);
+                    sb.append(line.trim());
                     sb.append('\n');
                 }
             }
--- a/langtools/test/tools/javap/T4884240.java	Tue Aug 04 17:26:41 2009 -0700
+++ b/langtools/test/tools/javap/T4884240.java	Wed Aug 05 07:43:50 2009 -0700
@@ -46,9 +46,9 @@
         pw.close();
         String[] lines = sw.toString().split("\n");
         if (lines.length < 3
-            || !lines[0].startsWith("Classfile")
-            || !lines[1].startsWith("Last modified")
-            || !lines[2].startsWith("MD5")) {
+            || !lines[0].trim().startsWith("Classfile")
+            || !lines[1].trim().startsWith("Last modified")
+            || !lines[2].trim().startsWith("MD5")) {
             System.out.println(sw);
             throw new Exception("unexpected output");
         }
--- a/langtools/test/tools/javap/T4975569.java	Tue Aug 04 17:26:41 2009 -0700
+++ b/langtools/test/tools/javap/T4975569.java	Wed Aug 05 07:43:50 2009 -0700
@@ -40,10 +40,10 @@
         verify("T4975569$Anno", "flags: ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION");
         verify("T4975569$E",    "flags: ACC_FINAL, ACC_SUPER, ACC_ENUM");
         verify("T4975569$S",    "flags: ACC_BRIDGE, ACC_SYNTHETIC",
-                                "InnerClasses: \n   static");
+                                "InnerClasses:\n       static");
         verify("T4975569$V",    "void m(java.lang.String...)",
                                 "flags: ACC_VARARGS");
-        verify("T4975569$Prot", "InnerClasses: \n   protected");
+        verify("T4975569$Prot", "InnerClasses:\n       protected");
         //verify("T4975569$Priv", "InnerClasses");
         if (errors > 0)
             throw new Error(errors + " found.");
--- a/langtools/test/tools/javap/stackmap/T6271292.sh	Tue Aug 04 17:26:41 2009 -0700
+++ b/langtools/test/tools/javap/stackmap/T6271292.sh	Wed Aug 05 07:43:50 2009 -0700
@@ -75,7 +75,7 @@
 grep "offset_delta" "${JAVAPFILE}" >> "${OUTFILE}"
 grep "stack = " "${JAVAPFILE}" >> "${OUTFILE}"
 grep "locals = " "${JAVAPFILE}" >> "${OUTFILE}"
-diff "${OUTFILE}" "${TESTSRC}${FS}T6271292.out"
+diff -w "${OUTFILE}" "${TESTSRC}${FS}T6271292.out"
 result="$?"
 if [ "$result" -eq 0 ]
 then