You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2026/08/01 07:38:02 UTC
(groovy) branch GROOVY_5_1_X updated (a97850c57f -> 9e7580a294)
This is an automated email from the ASF dual-hosted git repository.
paulk-asert pushed a change to branch GROOVY_5_1_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
from a97850c57f adjust version for 5_1_X stream
new e4c86197eb GROOVY-12221: Remove JApplet (which is gone in JDK26) as hard-coded API param in Console (backport for 5_1_X)
new 9e7580a294 add JDK26/27 for CI testing
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/groovy-build-test.yml | 50 +++++++++++++++++++++-
.../main/groovy/groovy/console/ui/Console.groovy | 26 -----------
.../ui/HistoryRecordGetTextToRunTests.groovy | 16 +------
3 files changed, 50 insertions(+), 42 deletions(-)
(groovy) 01/02: GROOVY-12221: Remove JApplet (which is gone in JDK26) as hard-coded API param in Console (backport for 5_1_X)
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
paulk-asert pushed a commit to branch GROOVY_5_1_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit e4c86197ebf6489adeab081ee2ae03a0ebb212da
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat Aug 1 17:30:50 2026 +1000
GROOVY-12221: Remove JApplet (which is gone in JDK26) as hard-coded API param in Console (backport for 5_1_X)
---
.../main/groovy/groovy/console/ui/Console.groovy | 26 ----------------------
.../ui/HistoryRecordGetTextToRunTests.groovy | 16 +------------
2 files changed, 1 insertion(+), 41 deletions(-)
diff --git a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/Console.groovy b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/Console.groovy
index 33a05bdc88..a929dfedb4 100644
--- a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/Console.groovy
+++ b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/Console.groovy
@@ -415,32 +415,6 @@ class Console implements CaretListener, HyperlinkListener, ComponentListener, Fo
run(frameConsoleDelegates)
}
- /**
- * Runs the console embedded in the given applet.
- *
- * <p><b>Known limitation:</b> {@code javax.swing.JApplet} was removed from the JDK
- * in Java 26 (JEP 504). Because this method's signature references that type, any
- * metaclass introspection of {@code Console} (including simply creating one) fails
- * to load on JDK 26+. This deprecated, unused overload is retained for backwards
- * compatibility; run the Groovy console on JDK 25 or earlier, or use a later Groovy
- * version where this method has been removed.
- *
- * @deprecated applets are obsolete and the Applet API was removed in JDK 26
- */
- @Deprecated
- @SuppressWarnings("removal") // TODO a future Groovy version will remove this method
- void run(javax.swing.JApplet applet) {
- run([
- rootContainerDelegate: {
- containingWindows += SwingUtilities.getRoot(applet.getParent())
- applet
- },
- menuBarDelegate : { arg ->
- current.JMenuBar = build(arg)
- }
- ])
- }
-
void run(Map defaults) {
swing = new SwingBuilder()
diff --git a/subprojects/groovy-console/src/test/groovy/groovy/console/ui/HistoryRecordGetTextToRunTests.groovy b/subprojects/groovy-console/src/test/groovy/groovy/console/ui/HistoryRecordGetTextToRunTests.groovy
index ec1e0fc2b9..28a2f816b6 100644
--- a/subprojects/groovy-console/src/test/groovy/groovy/console/ui/HistoryRecordGetTextToRunTests.groovy
+++ b/subprojects/groovy-console/src/test/groovy/groovy/console/ui/HistoryRecordGetTextToRunTests.groovy
@@ -19,26 +19,12 @@
package groovy.console.ui
import junit.framework.TestCase
-import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-import static groovy.test.GroovyAssert.isAtLeastJdk
-import static org.junit.Assume.assumeTrue
-
@RunWith(JUnit4)
class HistoryRecordGetTextToRunTests extends TestCase {
-
- @Before
- void setUp() {
- // javax.swing.JApplet was removed in JDK 26 (JEP 504); running scripts through
- // Console introspection here pulls it in, so skip on JDK 26+. Console retains its
- // deprecated run(JApplet) method for backwards compatibility; later Groovy versions
- // remove it (GROOVY-11912) and re-enable these tests.
- assumeTrue('javax.swing.JApplet was removed in JDK 26; Console cannot be introspected there', !isAtLeastJdk('26'))
- }
-
@Test
void testImport() {
assert java.text.SimpleDateFormat == runSelected('import java.text.SimpleDateFormat', 'return SimpleDateFormat')
@@ -91,4 +77,4 @@ class HistoryRecordGetTextToRunTests extends TestCase {
GroovyShell shell = new GroovyShell(Console.class.classLoader?.getRootLoader(), new Binding())
return shell.run(hr.getTextToRun(true), 'HistoryRecordScript', [])
}
-}
\ No newline at end of file
+}
(groovy) 02/02: add JDK26/27 for CI testing
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
paulk-asert pushed a commit to branch GROOVY_5_1_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 9e7580a294290bbcc4f154610945801d045e1c4f
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat Aug 1 17:37:53 2026 +1000
add JDK26/27 for CI testing
---
.github/workflows/groovy-build-test.yml | 50 ++++++++++++++++++++++++++++++++-
1 file changed, 49 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/groovy-build-test.yml b/.github/workflows/groovy-build-test.yml
index de8bf383b4..98421f8463 100644
--- a/.github/workflows/groovy-build-test.yml
+++ b/.github/workflows/groovy-build-test.yml
@@ -54,7 +54,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- java: [12, 13, 14, 15, 16, 18, 19, 20, 22, 23, 24]
+ java: [12, 13, 14, 15, 16, 18, 19, 20, 22, 23, 24, 26]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
@@ -69,3 +69,51 @@ jobs:
- name: Test with Gradle
run: ./gradlew test -Ptarget.java.home="$JAVA_HOME_${{ matrix.java }}_X64"
timeout-minutes: 60
+
+ # Canary job: run the test suite against an upcoming, not-yet-released JDK.
+ # setup-java has no first-class EA distribution, so we download the OpenJDK
+ # EA archive ourselves and install it via `distribution: 'jdkfile'` (which
+ # extracts/caches it and sets JAVA_HOME). We capture that JAVA_HOME as the
+ # *test target*, then set up a stable LTS JDK afterwards so Gradle itself
+ # runs on a GA build. `fail-fast: false` keeps EA breakage from failing the
+ # rest of the matrix. NOTE: the EA build number bumps ~weekly, so the URL
+ # below goes stale — refresh it (and jdk-version) from https://jdk.java.net/27/.
+ ea:
+ if: github.event_name == 'push'
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - jdk-url: "https://download.java.net/java/early_access/jdk27/33/GPL/openjdk-27-ea+33_linux-x64_bin.tar.gz"
+ jdk-version: "27.0.0-ea.33"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v6
+ - name: Download EA JDK
+ run: wget -nv -O "$RUNNER_TEMP/java_package.tar.gz" "${{ matrix.jdk-url }}"
+ - name: Setup EA JDK (test target)
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'jdkfile'
+ jdkFile: ${{ runner.temp }}/java_package.tar.gz
+ java-version: ${{ matrix.jdk-version }}
+ - name: Capture EA JAVA_HOME
+ run: echo "EA_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Setup build JDK
+ # Last setup-java wins, so Gradle runs on this stable LTS JDK while the
+ # tests target the EA JDK captured above via -Ptarget.java.home.
+ uses: actions/setup-java@v5
+ with:
+ check-latest: true
+ distribution: 'zulu'
+ java-version: '21'
+ - uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c
+ - name: Test with Gradle
+ run: ./gradlew test -Ptarget.java.home="$EA_JAVA_HOME"
+ timeout-minutes: 60
+ - name: Upload reports
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: build-reports-ea
+ path: '**/build/reports/'