# HG changeset patch # User emc # Date 1402343204 14400 # Node ID 876ee790862d2a88352ae374dc2d979ced5e5bcb # Parent ead62a035849552555f4aa60c688178851c0a194 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 diff -r ead62a035849 -r 876ee790862d 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()); } }