Skip to content

Type-check addToSet/removeFromSet before getOrCreateSet #14

@DiamondDagger590

Description

@DiamondDagger590

Description

addToSet and removeFromSet call getOrCreateSet() before checking the registered type, so passing an INT/LONG/etc. statistic key produces a ClassCastException instead of a clear error.

Solution

After getRegisteredStatisticOrThrow(key), validate statistic.getStatisticType() == StatisticType.SET_STRING.

Files

  • PlayerStatisticData.java

Priority: Low

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