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


The following commit(s) were added to refs/heads/master by this push:
     new e233689f83 minor refactor: remove deprecation warning
e233689f83 is described below

commit e233689f838fe0a45e54ac7b858de2615b7f1745
Author: Paul King <[email protected]>
AuthorDate: Sun Dec 22 12:00:09 2024 +1000

    minor refactor: remove deprecation warning
---
 .../src/main/groovy/groovy/swing/factory/RichActionWidgetFactory.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/subprojects/groovy-swing/src/main/groovy/groovy/swing/factory/RichActionWidgetFactory.groovy
 
b/subprojects/groovy-swing/src/main/groovy/groovy/swing/factory/RichActionWidgetFactory.groovy
index b0ffe59ba1..f79d813411 100644
--- 
a/subprojects/groovy-swing/src/main/groovy/groovy/swing/factory/RichActionWidgetFactory.groovy
+++ 
b/subprojects/groovy-swing/src/main/groovy/groovy/swing/factory/RichActionWidgetFactory.groovy
@@ -51,7 +51,7 @@ class RichActionWidgetFactory extends AbstractFactory {
         try {
             if (value instanceof GString) value = value as String
             if (value == null) {
-                return klass.newInstance()
+                return klass.getConstructor().newInstance()
             } else if (value instanceof Action) {
                 return actionCtor.newInstance(value)
             } else if (value instanceof Icon) {

Reply via email to