workflow groovy odd result

18 views
Skip to first unread message

Nigel Magnay

unread,
Nov 2, 2015, 5:53:02 PM11/2/15
to jenkin...@googlegroups.com
Script:

 def a = ["a", "b", "c", 3];

 def b = a.find() { x -> x instanceof Integer };
 println "$b";


In groovyConsole this prints 3 (as expected)

In workflow it prints 'false' ?

Jesse Glick

unread,
Nov 2, 2015, 6:23:31 PM11/2/15
to Jenkins Dev
On Mon, Nov 2, 2015 at 5:52 PM, Nigel Magnay <nigel....@gmail.com> wrote:
> def a = ["a", "b", "c", 3];
>
> def b = a.find() { x -> x instanceof Integer };

The infamous: https://issues.jenkins-ci.org/browse/JENKINS-26481
Reply all
Reply to author
Forward
0 new messages