Failure on non-void static GDK methods

5 views
Skip to first unread message

Klaus

unread,
Mar 1, 2011, 10:45:19 AM3/1/11
to GroovyLint
Hi Kyle,

I tested GroovyLint a bit with Grails and figured out that it fails at
the static GDK method Thread.start(String,Closure).
Some testing showed that it works with all non-static GDK-extensions.
Looking closer, i figured out that GL fails with all GDK-extenstions
to the JDK, which are
- static and
- non-void

E.g.
public static Thread start(Thread self, String name, Closure closure)
and
public static Date parse(Date self, String format, String input)

produce this error message (or similar):

org.codehaus.groovy.control.MultipleCompilationErrorsException:
startup failed:
Test.groovy: 23: GroovyLint: No overload of the method parse takes 2
argument(s)
(unless an overload was added at runtime)
def d = Date.parse("y","1999")
^

1 error

On the other hand,
public static void sleep(Object self, long milliseconds, Closure
onInterrupt)
does not produce any errors.

regards,
klaus.
Reply all
Reply to author
Forward
0 new messages