Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-210

equals/hashCode fix for Span and Limits

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None

      Description

      The hashCode() for Span and Limits classes are not good.

      Since min/start is often 0, the distribution of hashCode is very very poor, as all those will end up with 0 as the hashCode in previous samples.

      Equals() allowed subclasses (typ a bad idea) and had no null protection.

        Attachments

        1. hashCodeEquals_Patch.patch
          2 kB
          Niclas Hedhman

          Activity

            People

            • Assignee:
              gbrown Gregory K. Brown
              Reporter:
              niclas Niclas Hedhman
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: