changeset 1781:b391ecea538e

7030476: Fix conflicting use of JCTree/JCExpression Reviewed-by: mcimadamore
author vromero
date Mon, 27 May 2013 13:44:14 +0100
parents 0f8e9a0e5d9a
children c6df5b20f9eb
files src/share/classes/com/sun/tools/javac/comp/Lower.java src/share/classes/com/sun/tools/javac/tree/JCTree.java src/share/classes/com/sun/tools/javac/tree/TreeCopier.java src/share/classes/com/sun/tools/javac/tree/TreeMaker.java
diffstat 4 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/comp/Lower.java	Fri May 24 11:26:17 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Lower.java	Mon May 27 13:44:14 2013 +0100
@@ -2002,7 +2002,7 @@
         JCStatement rethrow;
         if (target.hasInitCause()) {
             // rethrow = "throw new NoClassDefFoundError().initCause(e);
-            JCTree throwExpr =
+            JCExpression throwExpr =
                 makeCall(makeNewClass(syms.noClassDefFoundErrorType,
                                       List.<JCExpression>nil()),
                          names.initCause,
--- a/src/share/classes/com/sun/tools/javac/tree/JCTree.java	Fri May 24 11:26:17 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/tree/JCTree.java	Mon May 27 13:44:14 2013 +0100
@@ -700,7 +700,7 @@
         public List<JCTypeParameter> getTypeParameters() {
             return typarams;
         }
-        public JCTree getExtendsClause() { return extending; }
+        public JCExpression getExtendsClause() { return extending; }
         public List<JCExpression> getImplementsClause() {
             return implementing;
         }
@@ -1175,7 +1175,7 @@
             return v.visitTry(this, d);
         }
         @Override
-        public List<? extends JCTree> getResources() {
+        public List<JCTree> getResources() {
             return resources;
         }
         @Override
@@ -1392,8 +1392,8 @@
      */
     public static class JCThrow extends JCStatement implements ThrowTree {
         public JCExpression expr;
-        protected JCThrow(JCTree expr) {
-            this.expr = (JCExpression)expr;
+        protected JCThrow(JCExpression expr) {
+            this.expr = expr;
         }
         @Override
         public void accept(Visitor v) { v.visitThrow(this); }
@@ -2466,7 +2466,7 @@
         JCBreak Break(Name label);
         JCContinue Continue(Name label);
         JCReturn Return(JCExpression expr);
-        JCThrow Throw(JCTree expr);
+        JCThrow Throw(JCExpression expr);
         JCAssert Assert(JCExpression cond, JCExpression detail);
         JCMethodInvocation Apply(List<JCExpression> typeargs,
                     JCExpression fn,
--- a/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java	Fri May 24 11:26:17 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java	Mon May 27 13:44:14 2013 +0100
@@ -340,7 +340,7 @@
 
     public JCTree visitThrow(ThrowTree node, P p) {
         JCThrow t = (JCThrow) node;
-        JCTree expr = copy(t.expr, p);
+        JCExpression expr = copy(t.expr, p);
         return M.at(t.pos).Throw(expr);
     }
 
--- a/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Fri May 24 11:26:17 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Mon May 27 13:44:14 2013 +0100
@@ -332,7 +332,7 @@
         return tree;
     }
 
-    public JCThrow Throw(JCTree expr) {
+    public JCThrow Throw(JCExpression expr) {
         JCThrow tree = new JCThrow(expr);
         tree.pos = pos;
         return tree;