Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-3472

ConsistentMap's key equality should not be influenced by #equals

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.0.0, 1.1.0, 1.2.0, 1.3.0
    • Fix Version/s: 1.4.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      1
    • Epic Link:

      Description

      ConsistentMap's key equality is based on serialized byte[].

      (1) By caching Key -> String representation,
      Cache will use Key's Object#equals for look up,
      which can possibly have different equality than byte[] equality,
      leading to wrong String to be used as a key in backend Database.

      (2) Similar issues with keySet(), entrySet()
      Set based on reference equality needs to be used to avoid
      deduplication based on Object#equals

        Attachments

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

          Activity

            People

            • Assignee:
              y-higuchi Yuta Higuchi
              Reporter:
              y-higuchi Yuta Higuchi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: