groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Lipp (JIRA)" <>
Subject [jira] [Created] (GROOVY-8284) getMetaClass should be annotated as (JavaBeans) transient
Date Thu, 10 Aug 2017 11:36:00 GMT
Michael Lipp created GROOVY-8284:

             Summary: getMetaClass should be annotated as (JavaBeans) transient
                 Key: GROOVY-8284
             Project: Groovy
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 2.4.12
            Reporter: Michael Lipp

All groovy classes have the "getMetaClass()" method. This breaks the (e.g. XML) serialization
of groovy classes that are supposed to represent JavaBeans.

While the serialization provided with Serializable or Externalizable examines the attributes
of a class, the special JavaBeans serialization provided by serializers based on [Encoders](
relies on the information provided by the [Introspector](

With respect to persistence, the PropertyDescriptor for "getMetaClass" should have the attribute
value "transient" set. The Introspector generates this value if the method has been annotated
as [Transient]( Because
this value is currently missing, the Encoder tries to serialize the MetaClass information,
which fails.

The groovy compiler should therefore annotate the "getMetaClass" method with the runtime annotation

This message was sent by Atlassian JIRA

View raw message