findbugs: add constructor that sets the member field, but may remove class as it is unused.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1470719 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2013-04-22 21:06:45 +00:00
parent c429128e8f
commit 59d2633770

View File

@ -56,6 +56,19 @@ public abstract class AbstractUntypedCollectionDecorator<E, D> implements Collec
super();
}
/**
* Constructor that wraps (not copies).
*
* @param coll the collection to decorate, must not be null
* @throws IllegalArgumentException if the collection is null
*/
protected AbstractUntypedCollectionDecorator(final Collection<D> coll) {
if (coll == null) {
throw new IllegalArgumentException("Collection must not be null");
}
this.collection = coll;
}
/**
* Gets the collection being decorated. All access to the decorated
* collection goes via this method.