changeset 1123:a6e2c1840ea1

7090700: fix for 7080267 breaks two tests Reviewed-by: ksrini
author jjg
date Wed, 14 Sep 2011 15:49:54 -0700
parents 1807fc3fd33c
children 826ae6a2f27d
files src/share/classes/com/sun/tools/javac/tree/JCTree.java
diffstat 1 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/tree/JCTree.java	Wed Sep 14 12:14:30 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/tree/JCTree.java	Wed Sep 14 15:49:54 2011 -0700
@@ -538,21 +538,6 @@
             super.setPos(pos);
             return this;
         }
-
-        /** Convert a statement tree to a pretty-printed string. */
-        @Override
-        public String toString() {
-            StringWriter s = new StringWriter();
-            try {
-                new Pretty(s, false).printStat(this);
-            }
-            catch (IOException e) {
-                // should never happen, because StringWriter is defined
-                // never to throw any IOExceptions
-                throw new AssertionError(e);
-            }
-            return s.toString();
-        }
     }
 
     public static abstract class JCExpression extends JCTree implements ExpressionTree {
@@ -1191,6 +1176,21 @@
         public int getTag() {
             return EXEC;
         }
+
+        /** Convert a expression-statement tree to a pretty-printed string. */
+        @Override
+        public String toString() {
+            StringWriter s = new StringWriter();
+            try {
+                new Pretty(s, false).printStat(this);
+            }
+            catch (IOException e) {
+                // should never happen, because StringWriter is defined
+                // never to throw any IOExceptions
+                throw new AssertionError(e);
+            }
+            return s.toString();
+        }
     }
 
     /**