Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8357272

add overrides for all default methods to wrapper collections

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • None
    • core-libs
    • None

      The checked, synchronized, and unmodifiable wrapper collections should override all default methods from the collections interfaces. This isn't strictly necessary for all default methods. However, there is a recurring pattern of bugs caused by missing overrides. Most recently was JDK-8351230 in which missing overrides caused thread safety issues with synchronized Lists. The synchronized wrappers seem most susceptible to this; indeed, there are additional race conditions in other synchronized collections that still need to be fixed (and which should be covered by this issue).

      Furthermore, we have had other instances of bugs being introduced by inherited default methods. See JDK-8029891 and JDK-8277520. There have also been similar bugs with the wrapper collections.

            smarks Stuart Marks
            smarks Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: