We took the opportunity with 2.5 to fix a long-known difference in behavior
between Java and Groovy. It is listed in the release notes as a breaking
change.
(Basically if you always stick with just the stack methods (push/pop) or
just the list methods (most other operations) you will be okay but if you
mix and match you need to change.

On Fri, Jul 27, 2018 at 12:39 AM Paolo Di Tommaso <paolo.ditomm...@gmail.com>
wrote:

> Dear all,
>
> I've found a evil change in the 2.5.1 when using an array list.
>
>
> The following snippet is OK on 2.4.x
>
>     def stack = new ArrayList()
>     stack.push('a')
>     stack.push('b')
>     stack.push('c')
>     assert stack.join('.') == 'a.b.c'
>
>
> When using 2.5.1 it the assertion fails
>
>
> stack.join('.') == 'a.b.c'
> |     |         |
> |     c.b.a     false
> [c, b, a]       2 differences (60% similarity)
>                 (c).b.(a)
>                 (a).b.(c)
>
>
> It looks the semantic of `push` is changed. Is that expected?
>
>
> p
>

Reply via email to