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

AbstractUntypedCollectionDecorator<E, D> is not used

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The public ctor for AbstractUntypedCollectionDecorator<E, D> takes no argument and so collection = null; however the protected ctor checks for collection parameter != null.

      The decorated() method says that all access to collection goes through it, and there is no setter.

      At present the only way to recover from calling the public ctor is for the sub-class to set collection directly.

      This is inconsistent.

      The class is abstract and there appear to be no concrete subclasses. Looks like the class might be superfluous, but if it is required, it should ideally have a private final collection field.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb@apache.org Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: