--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java Sat Apr 25 15:59:54 2015 +0530
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java Mon Apr 27 17:36:20 2015 +0530
@@ -2006,6 +2006,8 @@
* @param name The type's name.
*/
Symbol findType(Env<AttrContext> env, Name name) {
+ if (name == names.empty)
+ return typeNotFound; // do not allow inadvertent "lookup" of anonymous types
Symbol bestSoFar = typeNotFound;
Symbol sym;
boolean staticOnly = false;