8186873: Possible dead code \"com.sun.tools.javac.tree.TreeInfo.isAnonymousDiamond()\" which was added in 9
Summary: Removing unused method.
Reviewed-by: mcimadamore
--- 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: