mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-06 10:09:16 +00:00
Adding the predicate to the IllegalArgumentException as per COLLECTIONS-280
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@641165 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
700e4e9a68
commit
5a3a0041a0
@ -98,7 +98,7 @@ public class PredicatedCollection extends AbstractSerializableCollectionDecorato
|
||||
*/
|
||||
protected void validate(Object object) {
|
||||
if (predicate.evaluate(object) == false) {
|
||||
throw new IllegalArgumentException("Cannot add Object '" + object + "' - Predicate rejected it");
|
||||
throw new IllegalArgumentException("Cannot add Object '" + object + "' - Predicate '" + predicate + "' rejected it");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user