Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 42189 invoked from network); 20 Dec 2005 14:54:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Dec 2005 14:54:47 -0000 Received: (qmail 72651 invoked by uid 500); 20 Dec 2005 14:54:43 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 72566 invoked by uid 500); 20 Dec 2005 14:54:42 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 72483 invoked by uid 99); 20 Dec 2005 14:54:41 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2005 06:54:40 -0800 Received: by ajax.apache.org (Postfix, from userid 99) id B67F2CB; Tue, 20 Dec 2005 15:54:18 +0100 (CET) From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 37979] New: - [collections] PredicateUtils.allPredicate() should not throw if 1 or 0 predicates Message-ID: X-Bugzilla-Reason: AssignedTo Date: Tue, 20 Dec 2005 15:54:18 +0100 (CET) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=37979 Summary: [collections] PredicateUtils.allPredicate() should not throw if 1 or 0 predicates Product: Commons Version: 3.2 Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Collections AssignedTo: commons-dev@jakarta.apache.org ReportedBy: yozh@mx1.ru PredicateUtils.allPredicate() throws IllegalArgumentException if array with one or zero predicates is given. This is bad, because when I make my list of predicates (for example, parsing some string) I have to explicitly check number of predicates in list. Current behaviour limits usages of method without reason. PredicateUtils.allPredicate() should return first element of array in case of array with one element, and PredicateUtils.allPredicate() should return truePredicate() in case of empty array. Similary, PredicateUtils.anyPredicate() should return first predicate of array in case of array with one element, and PredicateUtils.anyPredicate() should return falsePredicate() in case of empty array. PredicateUtils.onePredicate() ... PredicateUtils.nonePredicate() ... This is almost backward compatible change, because nobody either passes arrays with zero or one predicates to this method or checks for IllegalArgumentException. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org