You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Björn Kautler (Jira)" <ji...@apache.org> on 2025/10/09 14:55:00 UTC

[jira] [Created] (GROOVY-11779) Object#dump should consider properties when fields are not accessible

Björn Kautler created GROOVY-11779:
--------------------------------------

             Summary: Object#dump should consider properties when fields are not accessible
                 Key: GROOVY-11779
                 URL: https://issues.apache.org/jira/browse/GROOVY-11779
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 5.0.1
            Reporter: Björn Kautler


Given this snippet:
{code:groovy}
class Person {
    String name
    int age
}
new Person(age: 18, name: 'Foo').dump()
{code}

With Groovy 4 this returns the expected {{<Person@689851fa name=Foo age=18>}}.
With Groovy 5 you get {{<Person@3d0b9ee6 name=inaccessible age=inaccessible>}}.

It would be nice if also with Groovy 5 you would get the proper information, especially when the fields are exposed as properties.
The Spock power assertion output got way less helpful with just {{inaccessible}} there.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)