Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-226

Collections with binary keys or values break equals()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4
    • Component/s: Java - Compiler
    • Labels:
      None

      Description

      In Java, byte[].equals tests object equality, not value equality. As a result, if you have two list<binary> (or set<binary>, or map<binary, binary> with the same values and you do TBase.equals(), two structs that match by value won't return true. If we're going to do value equality, which I think we should, then we should make this consistent with collection types.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bryanduxbury Bryan Duxbury
                Reporter:
                bryanduxbury Bryan Duxbury
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: