Skip to content

Defensive copy SET_STRING in getValue/populateFromEntries #11

@DiamondDagger590

Description

@DiamondDagger590

Description

getValue() returns live mutable set references. populateFromEntries() stores them directly. External code can mutate statistics bypassing events and dirty tracking.

Solution

Copy set values on ingress, return Collections.unmodifiableSet(...) from getValue().

Files

  • PlayerStatisticData.java

Priority: Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions