### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java,v retrieving revision 1.23 diff -u -r1.23 FlowAnalysisTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java 14 Sep 2007 12:56:45 -0000 1.23 +++ src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java 14 Sep 2007 15:40:33 -0000 @@ -1364,7 +1364,7 @@ // labeled loop // https://bugs.eclipse.org/bugs/show_bug.cgi?id=200158 // contrast this with test049 -public void _test048() { +public void test048() { runTest( new String[] { "X.java", #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java,v retrieving revision 1.37 diff -u -r1.37 LabeledStatement.java --- compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java 5 Oct 2006 06:33:38 -0000 1.37 +++ compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java 14 Sep 2007 15:40:41 -0000 @@ -51,26 +51,23 @@ } else { LabelFlowContext labelContext; FlowInfo statementInfo, mergedInfo; - if (((statementInfo = statement - .analyseCode( - currentScope, - (labelContext = - new LabelFlowContext( - flowContext, - this, - label, - (targetLabel = new BranchLabel()), - currentScope)), - flowInfo)).tagBits & FlowInfo.UNREACHABLE) != 0) { - if ((labelContext.initsOnBreak.tagBits & FlowInfo.UNREACHABLE) == 0) { - // an embedded loop has had no chance to reinject forgotten null info - mergedInfo = flowInfo.unconditionalCopy(). - addInitializationsFrom(labelContext.initsOnBreak); - } else { - mergedInfo = labelContext.initsOnBreak; - } - } else { - mergedInfo = statementInfo.mergedWith(labelContext.initsOnBreak); + statementInfo = statement.analyseCode( + currentScope, + (labelContext = + new LabelFlowContext( + flowContext, + this, + label, + (targetLabel = new BranchLabel()), + currentScope)), + flowInfo); + boolean reinjectNullInfo = (statementInfo.tagBits & FlowInfo.UNREACHABLE) != 0 && + (labelContext.initsOnBreak.tagBits & FlowInfo.UNREACHABLE) == 0; + mergedInfo = statementInfo.mergedWith(labelContext.initsOnBreak); + if (reinjectNullInfo) { + // an embedded loop has had no chance to reinject forgotten null info + ((UnconditionalFlowInfo)mergedInfo).addInitializationsFrom(flowInfo.unconditionalFieldLessCopy()). + addInitializationsFrom(labelContext.initsOnBreak.unconditionalFieldLessCopy()); } mergedInitStateIndex = currentScope.methodScope().recordInitializationStates(mergedInfo);