Skip to content

Commit

Permalink
Eclipse 4.20 (RC2a) JDT Patch for Groovy-Eclipse: JDT commit 14a4991
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Jun 15, 2021
1 parent b400f3d commit 063d77e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion groovy-eclipse.setup
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
<repository
url="https://download.eclipse.org/releases/2021-06"/>
<repository
url="https://download.eclipse.org/eclipse/updates/4.20-I-builds/I20210603-0040"/>
url="https://download.eclipse.org/eclipse/updates/4.20-I-builds/I20210611-1600"/>
</repositoryList>
<repositoryList
name="2021-03">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</license>

<requires>
<import feature="org.eclipse.jdt" version="3.18.800.v20210603-0432" patch="true"/>
<import feature="org.eclipse.jdt" version="3.18.800.v20210611-1600" patch="true"/>
</requires>

<plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3812,4 +3812,30 @@ public void testBug572431_5() {
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);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
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();
Expand Down
1 change: 1 addition & 0 deletions jdt-patch/e420/org.eclipse.jdt.core/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
2021-05-23: 8776058 (2021-06 M3)
2021-05-29: 1787e34 (2021-06 RC1)
2021-06-06: 0fc92c0 (2021-06 RC2)
2021-06-15: 14a4991 (2021-06 RC2a)
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<repository>
<id>eclipse</id>
<layout>p2</layout>
<url>https://download.eclipse.org/eclipse/updates/4.20-I-builds/I20210603-0040</url>
<url>https://download.eclipse.org/eclipse/updates/4.20-I-builds/I20210611-1600</url>
</repository>
</repositories>
<modules>
Expand Down

0 comments on commit 063d77e

Please sign in to comment.