You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "John Wagenleitner (JIRA)" <ji...@apache.org> on 2017/08/06 04:15:00 UTC
[jira] [Resolved] (GROOVY-8245) @Newify(auto=false) causing error
(in Groovy Web Console)
[ https://issues.apache.org/jira/browse/GROOVY-8245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Wagenleitner resolved GROOVY-8245.
---------------------------------------
Resolution: Fixed
Assignee: John Wagenleitner
Fix Version/s: 2.4.13
Thanks for reporting the issue.
> @Newify(auto=false) causing error (in Groovy Web Console)
> ---------------------------------------------------------
>
> Key: GROOVY-8245
> URL: https://issues.apache.org/jira/browse/GROOVY-8245
> Project: Groovy
> Issue Type: Bug
> Reporter: Eric Milles
> Assignee: John Wagenleitner
> Fix For: 2.4.13
>
>
> When I run this with no {{auto=flase}} attribute or with {{auto=true}}, it runs successfully (in Groovy Web Console). When I run as below, I get a strange error: {code}
> java.lang.ExceptionInInitializerError
> at Script1.run(Script1.groovy:15)
> Caused by: groovy.lang.MissingMethodException: No signature of method: static Bar.Foo() is applicable for argument types: () values: []
> Possible solutions: any(), is(java.lang.Object), any(groovy.lang.Closure), use([Ljava.lang.Object;), use(java.util.List, groovy.lang.Closure), use(java.lang.Class, groovy.lang.Closure)
> at Bar.<clinit>(Script1.groovy:10)
> {code}
> {code}
> class Foo {
> Foo() {
> println 'new foo'
> }
> }
> @Newify(auto=false, value=Foo)
> class Bar {
> static {
> Foo foo = Foo()
> }
> static void method() {}
> }
> ​Bar.method()
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)