Skip to content

Inconsistent rule map usage in XMLParser initRules method #13

@kenj1

Description

@kenj1

Hello. In reviewing the XMLParser class code, I noticed that the initRules method looks up the rule key as a String but put's it into the same map as an int (hashCode). This may be a missed change when you improved the parse performance rule lookup from String to Hashcode. This issue shows up in all 3 rules maps.

The net result is a location path will always create a new rulelist and thus only ever have one rule associated with it (last rule definition wins for that path). This could lead to wasted memory and/or unexpected behavior.

KenJ

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