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/04/07 11:44:54 UTC
(groovy) branch master updated (0a32575d31 -> 5c297be843)
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
from 0a32575d31 minor refactor: use latest Groovy versions for comparison
new 973eb66ea8 GROOVY-11912: Remove JApplet check from SwingBuilder factory registration
new 5c297be843 GROOVY-11912: Remove last remnants of JApplet which is gone in JDK26
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:
.../src/main/groovy/groovy/console/ui/Console.groovy | 14 --------------
.../console/ui/HistoryRecordGetTextToRunTests.groovy | 4 ----
.../src/main/groovy/groovy/swing/SwingBuilder.groovy | 1 -
3 files changed, 19 deletions(-)
(groovy) 01/02: GROOVY-11912: Remove JApplet check from SwingBuilder factory registration
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 973eb66ea8be5775713e030f0e2400084c1acb96
Author: jochenberger <fo...@gmail.com>
AuthorDate: Tue Apr 7 09:34:43 2026 +0200
GROOVY-11912: Remove JApplet check from SwingBuilder factory registration
`JApplet` has been deprecated for quite some time now (since Java 9) and was finally removed in Java 26. That means that SwingBuilder will stop working in Java 26:
```
Exception in thread "main" java.lang.RuntimeException: Could not init groovy.swing.SwingBuilder because of an exception in groovy.swing.SwingBuilder.registerBasicLayouts
at groovy.util.FactoryBuilderSupport.callAutoRegisterMethods(FactoryBuilderSupport.java:211)
at groovy.util.FactoryBuilderSupport.autoRegisterNodes(FactoryBuilderSupport.java:185)
at groovy.util.FactoryBuilderSupport.<init>(FactoryBuilderSupport.java:163)
at groovy.swing.SwingBuilder.<init>(SwingBuilder.groovy:101)
at groovy.swing.SwingBuilder.<init>(SwingBuilder.groovy)
...
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at groovy.util.FactoryBuilderSupport.callAutoRegisterMethods(FactoryBuilderSupport.java:206)
... 6 more
Caused by: java.lang.NoClassDefFoundError: javax/swing/JApplet
at groovy.swing.SwingBuilder.registerBeanFactory(SwingBuilder.groovy:303)
at groovy.util.FactoryBuilderSupport.registerBeanFactory(FactoryBuilderSupport.java:644)
at groovy.swing.SwingBuilder.registerBasicLayouts(SwingBuilder.groovy:229)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
... 8 more
Caused by: java.lang.ClassNotFoundException: javax.swing.JApplet
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:502)
... 12 more
```
---
.../groovy-swing/src/main/groovy/groovy/swing/SwingBuilder.groovy | 1 -
1 file changed, 1 deletion(-)
diff --git a/subprojects/groovy-swing/src/main/groovy/groovy/swing/SwingBuilder.groovy b/subprojects/groovy-swing/src/main/groovy/groovy/swing/SwingBuilder.groovy
index e80ab287a7..39e9262b9c 100644
--- a/subprojects/groovy-swing/src/main/groovy/groovy/swing/SwingBuilder.groovy
+++ b/subprojects/groovy-swing/src/main/groovy/groovy/swing/SwingBuilder.groovy
@@ -300,7 +300,6 @@ class SwingBuilder extends FactoryBuilderSupport {
} else if (JTable.isAssignableFrom(klass)) {
registerFactory(nodeName, groupName, new TableFactory(klass))
} else if (JComponent.isAssignableFrom(klass)
- || JApplet.isAssignableFrom(klass)
|| JDialog.isAssignableFrom(klass)
|| JFrame.isAssignableFrom(klass)
|| JWindow.isAssignableFrom(klass)
(groovy) 02/02: GROOVY-11912: Remove last remnants of JApplet which is gone in JDK26
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 5c297be8430735c0907ad55bede5f00176b3c568
Author: Paul King <pa...@asert.com.au>
AuthorDate: Tue Apr 7 21:44:44 2026 +1000
GROOVY-11912: Remove last remnants of JApplet which is gone in JDK26
---
.../src/main/groovy/groovy/console/ui/Console.groovy | 14 --------------
.../console/ui/HistoryRecordGetTextToRunTests.groovy | 4 ----
2 files changed, 18 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 3aeaac426a..a3ea2c470a 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
@@ -433,20 +433,6 @@ class Console implements CaretListener, HyperlinkListener, ComponentListener, Fo
run(frameConsoleDelegates)
}
- @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 9ef4838df4..78ebad0476 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,11 +19,7 @@
package groovy.console.ui
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.condition.EnabledForJreRange
-import org.junit.jupiter.api.condition.JRE
-// javax.swing.JApplet was removed in JDK 26; Console introspection via GroovyShell pulls it in
-@EnabledForJreRange(max = JRE.JAVA_25)
class HistoryRecordGetTextToRunTests {
@Test