You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/07/10 02:59:44 UTC

(commons-collections) branch master updated (14fa6cab9 -> 95eb7bc59)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git


    from 14fa6cab9 Migrate from deprecated API
     new af1609741 [Functional] FunctorUtils.validate(Predicate...) is now FunctorUtils.validate(java.util.function.Predicate...)
     new 95eb7bc59 [Functional] FunctorUtils.validate(Transformer...) is now FunctorUtils.validate(Function...)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/changes/changes.xml                                   |  2 ++
 .../commons/collections4/functors/FunctorUtils.java       | 15 ++++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)


(commons-collections) 02/02: [Functional] FunctorUtils.validate(Transformer...) is now FunctorUtils.validate(Function...)

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit 95eb7bc598639bb81cd129b5b2ae890271140154
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jul 9 22:59:39 2024 -0400

    [Functional] FunctorUtils.validate(Transformer...) is now
    FunctorUtils.validate(Function...)
---
 src/changes/changes.xml                                     |  1 +
 .../apache/commons/collections4/functors/FunctorUtils.java  | 13 +++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d177eab65..649e94beb 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -32,6 +32,7 @@
     <action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate StringKeyAnalyzer.StringKeyAnalyzer() in favor of StringKeyAnalyzer.INSTANCE.</action>
     <action type="fix" dev="ggregory" due-to="Gary Gregory">[Functional] FunctorUtils.validate(Closure...) is now FunctorUtils.validate(Consumer...).</action>
     <action type="fix" dev="ggregory" due-to="Gary Gregory">[Functional] FunctorUtils.validate(Predicate...) is now FunctorUtils.validate(java.util.function.Predicate...).</action>
+    <action type="fix" dev="ggregory" due-to="Gary Gregory">[Functional] FunctorUtils.validate(Transformer...) is now FunctorUtils.validate(Function...).</action>
     <!-- ADD -->
     <!-- UPDATE -->
     <action issue="COLLECTIONS-857" type="update" dev="ggregory" due-to="Claude Warren">Update bloom filter documentation #508.</action>
diff --git a/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java b/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java
index 2a01705ea..c4b8fe3c6 100644
--- a/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java
+++ b/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java
@@ -19,6 +19,7 @@ package org.apache.commons.collections4.functors;
 import java.util.Collection;
 import java.util.Objects;
 import java.util.function.Consumer;
+import java.util.function.Function;
 
 import org.apache.commons.collections4.Closure;
 import org.apache.commons.collections4.Predicate;
@@ -176,13 +177,13 @@ final class FunctorUtils {
     /**
      * Validate method
      *
-     * @param transformers  the transformers to validate
+     * @param functions  the transformers to validate
      */
-    static void validate(final Transformer<?, ?>... transformers) {
-        Objects.requireNonNull(transformers, "transformers");
-        for (int i = 0; i < transformers.length; i++) {
-            if (transformers[i] == null) {
-                throw new NullPointerException("transformers[" + i + "]");
+    static void validate(final Function<?, ?>... functions) {
+        Objects.requireNonNull(functions, "functions");
+        for (int i = 0; i < functions.length; i++) {
+            if (functions[i] == null) {
+                throw new NullPointerException("functions[" + i + "]");
             }
         }
     }


(commons-collections) 01/02: [Functional] FunctorUtils.validate(Predicate...) is now FunctorUtils.validate(java.util.function.Predicate...)

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit af16097417712d9d26b7ee6d6a89ce6584f2af2e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jul 9 22:49:28 2024 -0400

    [Functional] FunctorUtils.validate(Predicate...) is now
    FunctorUtils.validate(java.util.function.Predicate...)
---
 src/changes/changes.xml                                                 | 1 +
 .../java/org/apache/commons/collections4/functors/FunctorUtils.java     | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index c9817bcc6..d177eab65 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -31,6 +31,7 @@
     <action type="fix" dev="ggregory" due-to="Gary Gregory">PatriciaTrie constructor reuse the stateless singleton StringKeyAnalyzer.INSTANCE.</action>
     <action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate StringKeyAnalyzer.StringKeyAnalyzer() in favor of StringKeyAnalyzer.INSTANCE.</action>
     <action type="fix" dev="ggregory" due-to="Gary Gregory">[Functional] FunctorUtils.validate(Closure...) is now FunctorUtils.validate(Consumer...).</action>
+    <action type="fix" dev="ggregory" due-to="Gary Gregory">[Functional] FunctorUtils.validate(Predicate...) is now FunctorUtils.validate(java.util.function.Predicate...).</action>
     <!-- ADD -->
     <!-- UPDATE -->
     <action issue="COLLECTIONS-857" type="update" dev="ggregory" due-to="Claude Warren">Update bloom filter documentation #508.</action>
diff --git a/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java b/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java
index 9f970cd1f..2a01705ea 100644
--- a/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java
+++ b/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java
@@ -164,7 +164,7 @@ final class FunctorUtils {
      *
      * @param predicates  the predicates to validate
      */
-    static void validate(final Predicate<?>... predicates) {
+    static void validate(final java.util.function.Predicate<?>... predicates) {
         Objects.requireNonNull(predicates, "predicates");
         for (int i = 0; i < predicates.length; i++) {
             if (predicates[i] == null) {