Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-761

Remove SchemaNode hashCode()/equals()

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • 5.0.0
    • None
    • None
    • None
    • Operating System: All
      Platform: All

      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.

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: