You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ZAID MULLA (Jira)" <ji...@apache.org> on 2026/07/30 23:55:00 UTC
[jira] [Commented] (COLLECTIONS-859) Ambiguities in the Javadoc for PredicateUtils
[ https://issues.apache.org/jira/browse/COLLECTIONS-859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100599#comment-18100599 ]
ZAID MULLA commented on COLLECTIONS-859:
----------------------------------------
I've submitted a Pull Request for this issue: https://github.com/THE-ZAID01/commons-collections/pull/1
The PR clarifies the ambiguous @return Javadoc for nullIsExceptionPredicate, nullIsFalsePredicate, nullIsTruePredicate, and transformedPredicate. All builds pass locally via mvn.
Thank you for reviewing.
> Ambiguities in the Javadoc for PredicateUtils
> ---------------------------------------------
>
> Key: COLLECTIONS-859
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-859
> Project: Commons Collections
> Issue Type: Bug
> Reporter: Daniele
> Priority: Minor
>
> I found some ambiguities in the javadoc regarding the behavior of some methods:
> {*}PredicateUtils.nullIsExceptionPredicate(Predicate<? super T>):{*}{*}{*}
> When it says "return the predicate" doesn't mean return the predicate parameter (args[0]), but return a new predicate that checks if the input is null and, if so, throws an exception, otherwise, delegates the evaluation to predicate (args[0]).
> *PredicateUtils.nullIsFalsePredicate(Predicate<? super T>):*
> When it says "return the predicate" doesn't mean return the predicate parameter (args[0]), but return a new predicate that checks if the input is null and, if so, return false, otherwise, delegates the evaluation to predicate (args[0]).
> *PredicateUtils.nullIsTruePredicate(Predicate<? super T>):*
> W{*}{*}hen it says "return the predicate" doesn't mean return the predicate parameter (args[0]), but return a new predicate that checks if the input is null and, if so, return true, otherwise, delegates the evaluation to predicate (args[0]).
> *PredicateUtils.transformedPredicate(Transformer<? super T, ? extends T>, Predicate<? super T>):*
> When it says "return the predicate" doesn't mean return the predicate parameter (args[0]), but return a new predicate that create a predicate that transforms the input object before passing it to the predicate
--
This message was sent by Atlassian Jira
(v8.20.10#820010)