commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27556] - [collections] Predicate needs to ID failing clause
Date Sat, 13 Mar 2004 17:29:53 GMT
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

[collections] Predicate needs to ID failing clause

scolebourne@joda.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX
            Summary|Predicate needs to ID       |[collections] Predicate
                   |failing clause              |needs to ID failing clause



------- Additional Comments From scolebourne@joda.org  2004-03-13 17:29 -------
While I am sympathetic to the problem here, I don't believe there is a 
practical solution. An AndPredicate will return as soon as it finds a failing 
predicate. However, all it returns is the boolean false. Nothing else is 
returned. As a result, there is no hook to attach data such as an ID to.

One possible solution I can think of would be to wrap each 
Predicate/Transformer/Closure in another that logged the input and output, or 
stored it to a ThreadLocal variable for later inclusion in the error, but this 
could not be the default behaviour.

Also, since [collections] cannot depend on logging, only System.out is 
available which limits options.

The other solution I can think of is to use Aspects (AOP) to achieve the same 
logging effect.

I am closing as WontFix, unless someone else has a bright idea ;-)

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


Mime
View raw message