Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.1-rc-3
-
None
-
None
Description
The code:
class Foo { private static test(tokens) { tokens.collect { trimTag(it) } } private static trimTag(pluginVersion) { println 'in trim tag' int i = pluginVersion.indexOf('-') if(i > -1) { pluginVersion = pluginVersion[0,i] } println 'return version' + pluginVersion pluginVersion } } Foo.test(['1.0', '2.0'])
Results in
Exception thrown: java.lang.IllegalArgumentException: object is not an instance of declaring class java.lang.IllegalArgumentException: object is not an instance of declaring class at Foo$_test_closure1.doCall(Script1:4) at Foo.test(Script1:4) at Script1.run(Script1:19)