[
https://issues.apache.org/jira/browse/GROOVY-10705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King resolved GROOVY-10705.
--------------------------------
Fix Version/s: 4.0.5
3.0.13
Resolution: Fixed
> ToString order bug for super properties
> ---------------------------------------
>
> Key: GROOVY-10705
> URL: https://issues.apache.org/jira/browse/GROOVY-10705
> Project: Groovy
> Issue Type: Bug
> Reporter: Paul King
> Assignee: Paul King
> Priority: Major
> Fix For: 4.0.5, 3.0.13
>
>
> In the doco for @ToString, we indicate that properties from a child come
> before properties from super classes. This is true but properties that also
> happen to be present in super classes don't keep their respective order with
> other properties, e.g.:
> {code:java}
> class Base {
> String a = 'base a'
> String c = 'base c'
> }
> @groovy.transform.ToString(includeSuperProperties=true)
> class Child extends Base {
> String a = 'child a'
> String b = 'child b'
> }
> println new Child() // => Child(child b, child a, base c)
> {code}
> However, the expected order is for properties within the child class to
> follow declaration order.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)