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


The following commit(s) were added to refs/heads/master by this push:
     new 152390a  [COLLECTIONS-740] Add missing @throws comment for 
SwitchTransformer.switchTransformer. (#124)
152390a is described below

commit 152390a5a329eb34128df4ee7ce2b7986dbabaff
Author: Prodigysov <[email protected]>
AuthorDate: Mon Dec 9 17:01:12 2019 -0600

    [COLLECTIONS-740] Add missing @throws comment for 
SwitchTransformer.switchTransformer. (#124)
    
    * COLLECTIONS-740: Add missing @throws comment for 
SwitchTransformer.switchTransformer.
    
    * COLLECTIONS-740: Fix inconsistency between Javadocs of 
TransformerUtils.switchTransformer and SwitchTransformer.switchTransformer.
---
 src/main/java/org/apache/commons/collections4/TransformerUtils.java  | 4 ++--
 .../org/apache/commons/collections4/functors/SwitchTransformer.java  | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/collections4/TransformerUtils.java 
b/src/main/java/org/apache/commons/collections4/TransformerUtils.java
index 88b6b59..e9a2d80 100644
--- a/src/main/java/org/apache/commons/collections4/TransformerUtils.java
+++ b/src/main/java/org/apache/commons/collections4/TransformerUtils.java
@@ -289,7 +289,7 @@ public class TransformerUtils {
      * @param predicates  an array of predicates to check
      * @param transformers  an array of transformers to call
      * @return the transformer
-     * @throws NullPointerException if the either array is null
+     * @throws NullPointerException if either array is null
      * @throws NullPointerException if any element in the arrays is null
      * @throws IllegalArgumentException if the arrays have different sizes
      * @see SwitchTransformer
@@ -312,7 +312,7 @@ public class TransformerUtils {
      * @param transformers  an array of transformers to call
      * @param defaultTransformer  the default to call if no predicate matches, 
null means return null
      * @return the transformer
-     * @throws NullPointerException if the either array is null
+     * @throws NullPointerException if either array is null
      * @throws NullPointerException if any element in the arrays is null
      * @throws IllegalArgumentException if the arrays have different sizes
      * @see SwitchTransformer
diff --git 
a/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java 
b/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java
index 21e93da..0cfa3f9 100644
--- 
a/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java
+++ 
b/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java
@@ -49,8 +49,9 @@ public class SwitchTransformer<I, O> implements 
Transformer<I, O>, Serializable
      * @param transformers  matching array of transformers, cloned, no nulls
      * @param defaultTransformer  the transformer to use if no match, null 
means return null
      * @return the <code>chained</code> transformer
-     * @throws NullPointerException if array is null
-     * @throws NullPointerException if any element in the array is null
+     * @throws NullPointerException if either array is null
+     * @throws NullPointerException if any element in the arrays is null
+     * @throws IllegalArgumentException if the arrays have different sizes
      */
     @SuppressWarnings("unchecked")
     public static <I, O> Transformer<I, O> switchTransformer(final Predicate<? 
super I>[] predicates,

Reply via email to