5

And hours of debugging later, I realized that:
"xyz-" + cond ? "one" : "two"
is different than
"xyz-" + (cond ? "one" : "two")

I hate Groovy truth.

Comments
  • 1
    Ummm, I guess it's related to operator precedence?
  • 1
    @IndoDev Yes, that is why. But in any other language, a string could not be used as a condition, resulting in a compile-time error.
Add Comment