Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-317

AbstractHashedMap(Map map) constructor calls overridable non-final method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.0-alpha1, 4.0
    • Map
    • None

    Description

      The constructor AbstractHashedMap(Map map) calls the public non-final method putAll() from the same class.

      This is likely to cause problems if the method is ever overridden, as the parent may not have been completely initialised when the sub-class method is invoked.

      Possible solution: extract the code into a common private method. Or make the method final.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: