Skip to content

Empty EnumSet can't be used after being deserialized #72

@francisu

Description

@francisu

Adding these lines to the end of TestSet.testSet() shows the problem.

  ```

testSet._enumSet.remove(ManySets.EnumValues.E1);
testSet._enumSet.remove(ManySets.EnumValues.E2);
testSet._enumSet.remove(ManySets.EnumValues.E3);
json = TestUtil.getJsonString(testSet)
testSet = (ManySets) TestUtil.readJsonObject(json)
testSet._enumSet.add(ManySets.EnumValues.E1);


The problem is the elementType is null when the EnumSet is deserialized, and then it cannot be used to add values. The elementType needs to be retained during the serialization/deserialization process and it's not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions