8186873: Possible dead code \"com.sun.tools.javac.tree.TreeInfo.isAnonymousDiamond()\" which was added in 9
authorjlahoda
Thu, 19 Oct 2017 09:53:53 +0200
changeset 47362 e729cef2af4b
parent 47361 74e1913a98c0
child 47363 77c792d06646
8186873: Possible dead code \"com.sun.tools.javac.tree.TreeInfo.isAnonymousDiamond()\" which was added in 9 Summary: Removing unused method. Reviewed-by: mcimadamore
src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java	Thu Oct 19 09:01:29 2017 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java	Thu Oct 19 09:53:53 2017 +0200
@@ -198,18 +198,6 @@
         }
     }
 
-    /** Return true if the given tree represents a type elided anonymous class instance creation. */
-    public static boolean isAnonymousDiamond(JCTree tree) {
-        switch(tree.getTag()) {
-            case NEWCLASS:  {
-                JCNewClass nc = (JCNewClass)tree;
-                return nc.def != null && isDiamond(nc.clazz);
-            }
-            case ANNOTATED_TYPE: return isAnonymousDiamond(((JCAnnotatedType)tree).underlyingType);
-            default: return false;
-        }
-    }
-
     public static boolean isEnumInit(JCTree tree) {
         switch (tree.getTag()) {
             case VARDEF: