GMaven (OLD... DO NOT USE)

transient modifier is not handled correctly when generating stubs

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.0-rc-3
  • Fix Version/s: 1.0-rc-4
  • Component/s: stub generation
  • Labels:
    None
  • Environment:
    Suse linux, Maven 2.0.8, Groovy Version: 1.5.4 JVM: 10.0-b19, Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
  • Number of attachments :
    1

Description

Working on a project that has both java and groovy classes.
The groovy classes utilize serialization extensively for permanence and have a significant number of transient properties to reduce the serialized footprint of the classes.

The gmaven-plugin 1.0-rc-3 is producing invalid getter and setter stubs for the transient properties. I have attached one of the Groovy classes and the generated java stub for that class in a gzipped tar file.

The errors returned are all similar to:

target/generated-sources/groovy-stubs/main/org/oclc/dataload/frequency/SimpleCount.java:[41,29] modifier transient not allowed here

Where the generated class contains code like:

transient private boolean hasFixupSimpleCountDummy = false;
transient public boolean getHasFixupSimpleCountDummy() { throw new InternalError("Stubbed method"); }
transient public boolean isHasFixupSimpleCountDummy() { throw new InternalError("Stubbed method"); } }
transient public void setHasFixupSimpleCountDummy(boolean value) { throw new InternalError("Stubbed method"); }

Activity

Hide
Jason Dillon added a comment -

looks like volatile has the same problem too.

Show
Jason Dillon added a comment - looks like volatile has the same problem too.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: