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

Remove SchemaNode hashCode()/equals()

    XMLWordPrintable

Details

    • Story
    • Status: Resolved
    • Resolution: Done
    • None
    • 5.0.0
    • None
    • None
    • Operating System: All
      Platform: All

    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.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: