[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.
This commit is contained in:
Prodigysov 2019-12-09 17:01:12 -06:00 committed by Gary Gregory
parent dd69cc72dc
commit 152390a5a3
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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,