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

DTO equality appears to be broken by proxy

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 2988

    Description

      I have two instances of a DTO with identical field values:

      ConnectionInfo [_localIp=IpAddress [_ipv4Address=Ipv4Address [_value=127.0.0.1], _value=[1, 2, 7, ., 0, ., 0, ., 1]], _localPort=PortNumber [_value=62679], _remoteIp=IpAddress [_ipv4Address=Ipv4Address [_value=127.0.0.1], _value=[1, 2, 7, ., 0, ., 0, ., 1]], _remotePort=PortNumber [_value=16640], augmentation=[]]
      ConnectionInfo{getLocalIp=IpAddress [_ipv4Address=Ipv4Address [_value=127.0.0.1], _value=[1, 2, 7, ., 0, ., 0, ., 1]], getLocalPort=PortNumber [_value=62679], getRemoteIp=IpAddress [_ipv4Address=Ipv4Address [_value=127.0.0.1], _value=[1, 2, 7, ., 0, ., 0, ., 1]], getRemotePort=PortNumber [_value=16640], augmentations={}}

      The first is created with a Builder, the second comes back from the datastore.

      I have a Map clients that has a key from the one build with the builder.

      clients.get(<the one from the datastore read>) returns null in spite of
      there being an instance with exactly the same field values.

      Also... apparently they have different toString() results... weird.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            hagbard Ed Warnicke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: