trunkCounter in VersionedObject.java

openehr-rm/src/main/java/org/openehr/rm/common/changecontrol/VersionedObject.java

As far as I understand, it is only used once, in comparison in
addVersion, also I found it is never initialised.

This looks to me like a bug.

Rong or someone else, can you please comment on this

Thanks
Bert

Bert Verhees schreef:

openehr-rm/src/main/java/org/openehr/rm/common/changecontrol/VersionedObject.java

As far as I understand, it is only used once, in comparison in
addVersion, also I found it is never initialised.

This looks to me like a bug.

Rong or someone else, can you please comment on this

The problem is a bit different. The trunkCounter gets incremented
everytime addVersion is called.
addVersion is called from setVersions

trunkCounter should be set to 0 when in this code setVersions is called,
The mpas are also recreated, so the trunkCounter should be in sync

Thanks
Bert

Hi Bert,

I will look into this. Thanks for reporting.

Regards,
Rong