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 b0ffe59ba10..f79d8134112 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) {