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/13 18:29:53 UTC
DO NOT REPLY [Bug 27556] -
[collections] 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
[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