[YANGTOOLS-1425] Compute YangInstanceIdentifier.hashCode lazily Created: 10/Apr/22  Updated: 23/Apr/22  Resolved: 23/Apr/22

Status: Resolved
Project: yangtools
Component/s: data-api
Affects Version/s: None
Fix Version/s: 9.0.0

Type: Improvement Priority: High
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We are currently computing YangInstanceIdentifier's hashCode eagerly during construction. This is not needed in most cases, because even though it is used for equals(), we rarely perform equality/hash-base lookups and most of the time we just examine the PathArguments.

Refactor the code to calculate the hashCode only when needed and update equals() methods to work on PathArguments only.


Generated at Wed Feb 07 20:56:07 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.