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

Bug in equals method in ArrayList and LinkedList

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4
    • 1.5
    • core-collections
    • 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. ArrayList_equals.patch
          2 kB
          Alejandro Vilar
        2. LinkedList_equals.patch
          2 kB
          Alejandro Vilar

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: