Skip to content

XMLParser.Location.clear() does not reset the Integer hashcode cache #7

@ghost

Description

Every time a unique path in XML is parsed an Integer hashCode is created for it and cached by the internal Location instance.

The Location.clear() method wasn't clearing that cache, which only effects 1 parse use-case negatively, and even in that negative use-case, the performance is still magnitudes faster than it was in the 1.x series anyway.

Affected Scenario

The same XMLParser instance is used to parse many, completely different, XML files back to back. At some point the internal hashCodeCache will become saturated with unique hash codes representing the unique paths in the XML, and individual Integer instances will be created without hitting the cache from that point forward.

This is a minor issue, and not that common, but should still be corrected for.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions