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

Bug in equals method in ArrayList and LinkedList

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5
    • Component/s: core-collections
    • Labels:
      None

      Description

      equals method in ArrayList and LinkedList always returns true when are compared with different class objects:

      ArrayList list=new ArrayList();
      list.equals("foo"); //returns true

      Also when are compared with different List implementations (ignoring list's content)

        Attachments

        1. LinkedList_equals.patch
          2 kB
          Alejandro Vilar
        2. ArrayList_equals.patch
          2 kB
          Alejandro Vilar

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              avilar Alejandro Vilar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: