[YANGTOOLS-761] Remove SchemaNode hashCode()/equals() Created: 22/Mar/17  Updated: 10/Apr/22  Resolved: 17/Apr/20

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0

Type: Story
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks YANGTOOLS-1076 Trim down SchemaPath size Resolved
is blocked by YANGTOOLS-1075 Parser accepts duplicate identity def... Resolved
Relates
relates to YANGTOOLS-1068 Drop SchemaNode Set-returning methods... Resolved

 Description   

Our SchemaNode implementations have pretty much arbitrary hashCode/equals implementations, mostly centered around SchemaPath. These are not documented anywhere in the interface specification.

Specifying these is rather troublesome because of the number of classes involved and the requirement of equals() being reflection. This leads to equality not being useful beyond SchemaContext-specific caches, where defaults from java.lang.Object perform better.

Audit all SchemaNode implementations and remove overridden hashCode/equals methods.

If a requirement to compare SchemaNodes surfaces, such as cross-SchemaContext data migration, that functionality needs to be exposed as a separate API.


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