8046296: java/util/concurrent/BlockingQueue/PollMemoryLeak.java fails in nightly on all platform due to compiler issue
authoremc
Mon, 09 Jun 2014 15:46:44 -0400
changeset 24900 876ee790862d
parent 24899 ead62a035849
child 24901 73bacb7d064e
8046296: java/util/concurrent/BlockingQueue/PollMemoryLeak.java fails in nightly on all platform due to compiler issue Summary: Alter logic to choose type of type annotation position for a variable declaration Reviewed-by: jjg
langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Jun 09 12:54:02 2014 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Jun 09 15:46:44 2014 -0400
@@ -1074,18 +1074,10 @@
                 return annotate.paramCreator(index);
             }
         }
-        case CASE:
-        case BLOCK:
-        case FORLOOP:
-        case FOREACHLOOP:
-        case LABELLED:
-            // These are all cases where we can end up with a
-            // local variable.
+        default:
+            // The default case is to treat any declaration as a local
+            // variable.
             return annotate.localVarCreator(tree.pos);
-        default:
-            // Be strict and throw an error if we see
-            // something we don't expect.
-            throw new AssertionError("Unexpected enclosing tree for variable definition: " + env.tree.getTag());
         }
     }