From 46dd5c77cd9ca324f52f3f84d93316443c791bc7 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Mon, 15 Jan 2024 14:14:47 +0300 Subject: [PATCH] Fix fork CI tools reference Point CI to the forked tools repository that has java 17 support changes. fix gwtproject/gwt#9871 related to gwtproject/gwt#9869 --- .github/workflows/full-check.yml | 4 ++-- .github/workflows/quick-check.yml | 4 ++-- .../src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java | 3 +-- .../test/com/google/gwt/dev/jjs/impl/Java17AstTest.java | 7 +++---- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/full-check.yml b/.github/workflows/full-check.yml index 294f560f1b..1507e94066 100644 --- a/.github/workflows/full-check.yml +++ b/.github/workflows/full-check.yml @@ -29,8 +29,8 @@ jobs: - name: Checkout GWT tools into a sibling directory uses: actions/checkout@v4 with: - repository: 'Vertispan/tools' - ref: 'errorprone-2.23' + repository: 'vegegoku/tools' + ref: 'java-17-support' path: 'tools' - name: Set up JDK ${{ matrix.java-version }} # GWT requires Java 11+ to build diff --git a/.github/workflows/quick-check.yml b/.github/workflows/quick-check.yml index 87882999fe..5a379cb7a9 100644 --- a/.github/workflows/quick-check.yml +++ b/.github/workflows/quick-check.yml @@ -19,8 +19,8 @@ jobs: - name: Checkout GWT tools into a sibling directory uses: actions/checkout@v4 with: - repository: 'Vertispan/tools' - ref: 'errorprone-2.23' + repository: 'vegegoku/tools' + ref: 'java-17-support' path: 'tools' - name: Set up JDK ${{ matrix.java-version }} # GWT presently requires Java 11+ to build diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java b/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java index 3bf9605436..383ce21dd1 100644 --- a/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java +++ b/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java @@ -537,7 +537,7 @@ public void endVisit(BreakStatement x, BlockScope scope) { @Override public void endVisit(CaseStatement x, BlockScope scope) { - if(x.isExpr){ + if (x.isExpr) { InternalCompilerException excption = new InternalCompilerException("Switch expressions not yet supported"); excption.addNode(new JCaseStatement(makeSourceInfo(x), null)); @@ -3718,7 +3718,6 @@ private JType[] processCastType(TypeBinding type) { } } - private boolean isFunctionalInterfaceWithMethod(ReferenceBinding referenceBinding, Scope scope, String samSignature) { if (!referenceBinding.isInterface()) { diff --git a/dev/core/test/com/google/gwt/dev/jjs/impl/Java17AstTest.java b/dev/core/test/com/google/gwt/dev/jjs/impl/Java17AstTest.java index ebeaa04f5d..f5e83413cd 100644 --- a/dev/core/test/com/google/gwt/dev/jjs/impl/Java17AstTest.java +++ b/dev/core/test/com/google/gwt/dev/jjs/impl/Java17AstTest.java @@ -91,7 +91,7 @@ public void testSealedClassesNotPermitted() { "}"); compileSnippet("void", "Shape rectangle = new Rectangle();"); fail("Compile should have failed but succeeded."); - }catch (Exception e) { + } catch (Exception e) { if (!(e.getCause() instanceof UnableToCompleteException) && !(e instanceof UnableToCompleteException)) { e.printStackTrace(); @@ -100,7 +100,7 @@ public void testSealedClassesNotPermitted() { } } - public void testSwitchExpressionsNotSupported(){ + public void testSwitchExpressionsNotSupported() { try { compileSnippet("void", "var month = Months.JUNE;" + "var result = switch(month) {\n" + @@ -110,7 +110,7 @@ public void testSwitchExpressionsNotSupported(){ " default -> 0;" + "};"); fail("Compile should have failed but succeeded, switch expression is not supported."); - }catch (Exception e){ + } catch (Exception e) { if (!(e.getCause() instanceof InternalCompilerException) && !(e instanceof InternalCompilerException)) { e.printStackTrace(); @@ -118,7 +118,6 @@ public void testSwitchExpressionsNotSupported(){ } assertEquals("Switch expressions not yet supported", e.getMessage()); } - } @Override