This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
The following commit(s) were added to refs/heads/master by this push:
new 3c77e2399 [COLLECTIONS-859] Clarify ambiguous @return Javadoc in
PredicateUtils.
3c77e2399 is described below
commit 3c77e2399f9858e48014d67074a20424c7f439b0
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Jul 31 08:58:20 2026 -0400
[COLLECTIONS-859] Clarify ambiguous @return Javadoc in PredicateUtils.
---
src/changes/changes.xml | 1 +
.../java/org/apache/commons/collections4/PredicateUtils.java | 12 ++++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d13c693fd..7375247d2 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -87,6 +87,7 @@
<action type="fix" dev="ggregory" due-to="Gary Gregory">Add messages when
throwing NullPointerException.</action>
<action type="fix" dev="ggregory" due-to="Naveed Khan, Gary
Gregory">Reject remove on the Unmodifiable map from SplitMapUtils.readableMap
(#718).</action>
<action type="fix" dev="ggregory" due-to="Naveed Khan, Gary Gregory">Keep
OrderedProperties keySet and values in sync with the map (#719).</action>
+ <action type="fix" dev="ggregory" due-to="Daniele, THE_ZAID, Gary Gregory"
issue="COLLECTIONS-859">Clarify ambiguous @return Javadoc in
PredicateUtils.</action>
<!-- ADD -->
<action type="add" dev="ggregory" due-to="Gary Gregory">Add generics to
UnmodifiableIterator for the wrapped type.</action>
<action type="add" dev="ggregory" due-to="Gary Gregory">Add a Maven
benchmark profile for JMH.</action>
diff --git a/src/main/java/org/apache/commons/collections4/PredicateUtils.java
b/src/main/java/org/apache/commons/collections4/PredicateUtils.java
index cad9e852b..11ff55a59 100644
--- a/src/main/java/org/apache/commons/collections4/PredicateUtils.java
+++ b/src/main/java/org/apache/commons/collections4/PredicateUtils.java
@@ -379,7 +379,8 @@ public class PredicateUtils {
*
* @param <T> the type that the predicate queries
* @param predicate The predicate to wrap, may not be null
- * @return The predicate
+ * @return A new predicate that throws a NullPointerException if the input
+ * is null, otherwise delegates to the given predicate.
* @throws NullPointerException if the predicate is null.
* @see NullIsExceptionPredicate
*/
@@ -394,7 +395,8 @@ public class PredicateUtils {
*
* @param <T> the type that the predicate queries
* @param predicate The predicate to wrap, may not be null
- * @return The predicate
+ * @return A new predicate that returns false if the input is null,
+ * otherwise delegates to the given predicate.
* @throws NullPointerException if the predicate is null.
* @see NullIsFalsePredicate
*/
@@ -409,7 +411,8 @@ public class PredicateUtils {
*
* @param <T> the type that the predicate queries
* @param predicate The predicate to wrap, may not be null
- * @return The predicate
+ * @return A new predicate that returns true if the input is null,
+ * otherwise delegates to the given predicate.
* @throws NullPointerException if the predicate is null.
* @see NullIsTruePredicate
*/
@@ -483,7 +486,8 @@ public class PredicateUtils {
* @param <T> the type that the predicate queries
* @param transformer The transformer to call first
* @param predicate The predicate to call with the result of the transform
- * @return The predicate
+ * @return A new predicate that transforms the input object using the given
+ * transformer and then passes the result to the given predicate.
* @throws NullPointerException if the transformer or the predicate is null
* @see TransformedPredicate
* @since 3.1