-
Bug
-
Resolution: Unresolved
-
Minor
-
None
Hello Guys,
I found some weird behavior difference in executing the same groovy logic in pipeline from the original groovy 2.4.12 (used in the latest LTS Jenkins by default).
The next logic is working in different ways for pipeline and script console:
def b = 3
def a = b = 4
print("${a} ${b}")
- Groovy console print output: "4 4"
- Pipeline echo output: "null 4"
Who can tell why? I just can't catch the difference.
[JENKINS-59911] Result of assignment expression is null rather than assigned value
Component/s | Original: groovy-plugin [ 15549 ] | |
Assignee | Original: vjuranek [ vjuranek ] |
Summary | Original: Different behavior for groovy in pipeline and script console | New: Result of assignment expression is null rather than assigned value |
jglick maybe you can help with this question?