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:
Henri Yandell 2008-03-26 06:04:56 +00:00
parent 700e4e9a68
commit 5a3a0041a0

View File

@ -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");
}
}