You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/03/10 07:51:22 UTC

DO NOT REPLY [Bug 27556] New: - Predicate needs to ID failing clause

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27556>.
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=27556

Predicate needs to ID failing clause

           Summary: Predicate needs to ID failing clause
           Product: Commons
           Version: 3.0 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Collections
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: jmadden@ics.uci.edu
                CC: jmadden@ics.uci.edu


When an insertion into a PredicatedSet (Map, etc.) fails, the exception thrown is very generic: "Cannot 
add Object 'V0' - Predicate rejected it".  Specifically, the exception does not identify which Predicate of 
a composite predicate is responsible for the rejection.  This makes error identification and recovery 
difficult.

One possible solution: add a getMessage() signature (returning an identifying String) to the Predicate 
interface; this String could be appended to the IllegalArgumentException's message.  

This bug is related to bug #27515; however, I am more concerned with identifying the rejecting base-
level Predicate than with extracting the Predicates which form a composite Predicate (e.g., 
AllPredicate, AndPredicate).

Thanks in advance for your assistance.  

Joshua O'Madadhain

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org