Author: tn
Date: Mon Apr 22 21:06:45 2013
New Revision: 1470719
URL: http://svn.apache.org/r1470719
Log:
findbugs: add constructor that sets the member field, but may remove class as
it is unused.
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/AbstractUntypedCollectionDecorator.java
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/AbstractUntypedCollectionDecorator.java
URL:
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/AbstractUntypedCollectionDecorator.java?rev=1470719&r1=1470718&r2=1470719&view=diff
==============================================================================
---
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/AbstractUntypedCollectionDecorator.java
(original)
+++
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/AbstractUntypedCollectionDecorator.java
Mon Apr 22 21:06:45 2013
@@ -57,6 +57,19 @@ public abstract class AbstractUntypedCol
}
/**
+ * 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.
*