update jdt.core to I20210611-1600 for 4.20 RC2a
Change-Id: Iebffef80503d3145fea776312f340aee28a2abe9
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PatternMatching16Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PatternMatching16Test.java
index bcb28a1..36c96df 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PatternMatching16Test.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PatternMatching16Test.java
@@ -3812,4 +3812,30 @@
options);
}
+ public void testBug572431_6() {
+ Map<String, String> options = getCompilerOptions(false);
+ runConformTest(
+ new String[] {
+ "X.java",
+ "public class X {\n"
+ + " static public void something () {\n"
+ + " boolean bool = true;\n"
+ + " Object object = null;\n"
+ + " for (int i = 0; i < 10; i++) {\n"
+ + " if (object instanceof String string) {\n"
+ + " System.out.println(i);\n"
+ + " } else if (bool) {\n"
+ + " if (i == 4) continue;\n"
+ + " System.out.println(i);\n"
+ + " }\n"
+ + " }\n"
+ + " }\n"
+ + " static public void main (String[] args) throws Exception {\n"
+ + " }\n"
+ + "}",
+ },
+ "",
+ options);
+
+ }
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
index 8072d94..1c19698 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
@@ -105,7 +105,7 @@
flowContext.recordUsingNullReference(currentScope, local,
this.expression, FlowContext.CAN_ONLY_NULL | FlowContext.IN_INSTANCEOF, flowInfo);
// no impact upon enclosing try context
- flowInfo = FlowInfo.conditional(initsWhenTrue, flowInfo.copy());
+ flowInfo = FlowInfo.conditional(initsWhenTrue.copy(), flowInfo.copy());
} else if (this.expression instanceof Reference) {
if (currentScope.compilerOptions().enableSyntacticNullAnalysisForFields) {
FieldBinding field = ((Reference)this.expression).lastFieldBinding();