diff --git a/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java b/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java index 65ba8a775..0d0aac569 100644 --- a/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java +++ b/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java @@ -66,7 +66,6 @@ public class ChainedTransformer implements Transformer, Serializable { * @throws NullPointerException if the transformers collection is null * @throws NullPointerException if any transformer in the collection is null */ - @SuppressWarnings("unchecked") public static Transformer chainedTransformer( final Collection> transformers) { if (transformers == null) { diff --git a/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java b/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java index 37feec32f..a01eba062 100644 --- a/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java +++ b/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java @@ -45,7 +45,6 @@ public class CloneTransformer implements Transformer { * @return the singleton instance * @since 3.1 */ - @SuppressWarnings("unchecked") // the singleton instance works for all types public static Transformer cloneTransformer() { return INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/ConstantFactory.java b/src/main/java/org/apache/commons/collections4/functors/ConstantFactory.java index dbd3dddf0..b915ee475 100644 --- a/src/main/java/org/apache/commons/collections4/functors/ConstantFactory.java +++ b/src/main/java/org/apache/commons/collections4/functors/ConstantFactory.java @@ -49,7 +49,6 @@ public class ConstantFactory implements Factory, Serializable { * @param constantToReturn the constant object to return each time in the factory * @return the constant factory. */ - @SuppressWarnings("unchecked") // The null factory works for all object types public static Factory constantFactory(final T constantToReturn) { if (constantToReturn == null) { return NULL_INSTANCE; diff --git a/src/main/java/org/apache/commons/collections4/functors/ConstantTransformer.java b/src/main/java/org/apache/commons/collections4/functors/ConstantTransformer.java index 3fb5f3370..dd33e4724 100644 --- a/src/main/java/org/apache/commons/collections4/functors/ConstantTransformer.java +++ b/src/main/java/org/apache/commons/collections4/functors/ConstantTransformer.java @@ -49,7 +49,6 @@ public class ConstantTransformer implements Transformer, Serializabl * @param the output type * @return Transformer<I, O> that always returns null. */ - @SuppressWarnings("unchecked") // The null transformer works for all object types public static Transformer nullTransformer() { return NULL_INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java b/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java index 36c116d95..c2d719db4 100644 --- a/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java +++ b/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java @@ -46,7 +46,6 @@ public class DefaultEquator implements Equator, Serializable { * @param the object type * @return the singleton instance */ - @SuppressWarnings("unchecked") // the static instance works for all types public static DefaultEquator defaultEquator() { return DefaultEquator.INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/ExceptionClosure.java b/src/main/java/org/apache/commons/collections4/functors/ExceptionClosure.java index ce6843e05..3ccc9683d 100644 --- a/src/main/java/org/apache/commons/collections4/functors/ExceptionClosure.java +++ b/src/main/java/org/apache/commons/collections4/functors/ExceptionClosure.java @@ -42,7 +42,6 @@ public final class ExceptionClosure implements Closure, Serializable { * @return the singleton instance * @since 3.1 */ - @SuppressWarnings("unchecked") // the static instance works for all types public static Closure exceptionClosure() { return INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/ExceptionFactory.java b/src/main/java/org/apache/commons/collections4/functors/ExceptionFactory.java index a40b55390..0d9d83ff4 100644 --- a/src/main/java/org/apache/commons/collections4/functors/ExceptionFactory.java +++ b/src/main/java/org/apache/commons/collections4/functors/ExceptionFactory.java @@ -42,7 +42,6 @@ public final class ExceptionFactory implements Factory, Serializable { * @return the singleton instance * @since 3.1 */ - @SuppressWarnings("unchecked") // the static instance works for all types public static Factory exceptionFactory() { return INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/ExceptionPredicate.java b/src/main/java/org/apache/commons/collections4/functors/ExceptionPredicate.java index 6d8f2aa03..9eacefd58 100644 --- a/src/main/java/org/apache/commons/collections4/functors/ExceptionPredicate.java +++ b/src/main/java/org/apache/commons/collections4/functors/ExceptionPredicate.java @@ -42,7 +42,6 @@ public final class ExceptionPredicate implements Predicate, Serializable { * @return the singleton instance * @since 3.1 */ - @SuppressWarnings("unchecked") // the static instance works for all types public static Predicate exceptionPredicate() { return INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/ExceptionTransformer.java b/src/main/java/org/apache/commons/collections4/functors/ExceptionTransformer.java index 3626fb953..3412365ac 100644 --- a/src/main/java/org/apache/commons/collections4/functors/ExceptionTransformer.java +++ b/src/main/java/org/apache/commons/collections4/functors/ExceptionTransformer.java @@ -43,7 +43,6 @@ public final class ExceptionTransformer implements Transformer, Seri * @return the singleton instance * @since 3.1 */ - @SuppressWarnings("unchecked") // the static instance works for all types public static Transformer exceptionTransformer() { return INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/FalsePredicate.java b/src/main/java/org/apache/commons/collections4/functors/FalsePredicate.java index f88f01801..f3dd7e136 100644 --- a/src/main/java/org/apache/commons/collections4/functors/FalsePredicate.java +++ b/src/main/java/org/apache/commons/collections4/functors/FalsePredicate.java @@ -41,7 +41,6 @@ public final class FalsePredicate implements Predicate, Serializable { * @return the singleton instance * @since 4.0 */ - @SuppressWarnings("unchecked") // the static instance works for all types public static Predicate falsePredicate() { return INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java b/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java index e8c624b9e..7ae7246ed 100644 --- a/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java +++ b/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java @@ -50,7 +50,6 @@ public class InstantiateTransformer implements Transformer * @param the type of the objects to be created * @return Transformer<Class<? extends T>, T> */ - @SuppressWarnings("unchecked") public static Transformer, T> instantiateTransformer() { return NO_ARG_INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/NOPClosure.java b/src/main/java/org/apache/commons/collections4/functors/NOPClosure.java index 1ec9d153d..6bc4e2a5a 100644 --- a/src/main/java/org/apache/commons/collections4/functors/NOPClosure.java +++ b/src/main/java/org/apache/commons/collections4/functors/NOPClosure.java @@ -41,7 +41,6 @@ public final class NOPClosure implements Closure, Serializable { * @return the singleton instance * @since 3.1 */ - @SuppressWarnings("unchecked") public static Closure nopClosure() { return INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/NOPTransformer.java b/src/main/java/org/apache/commons/collections4/functors/NOPTransformer.java index 439902d27..4b23ded52 100644 --- a/src/main/java/org/apache/commons/collections4/functors/NOPTransformer.java +++ b/src/main/java/org/apache/commons/collections4/functors/NOPTransformer.java @@ -41,7 +41,6 @@ public class NOPTransformer implements Transformer, Serializable { * @return the singleton instance * @since 3.1 */ - @SuppressWarnings("unchecked") public static Transformer nopTransformer() { return INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/NotNullPredicate.java b/src/main/java/org/apache/commons/collections4/functors/NotNullPredicate.java index e6a47c440..871bbb89e 100644 --- a/src/main/java/org/apache/commons/collections4/functors/NotNullPredicate.java +++ b/src/main/java/org/apache/commons/collections4/functors/NotNullPredicate.java @@ -41,7 +41,6 @@ public final class NotNullPredicate implements Predicate, Serializable { * @return the singleton instance * @since 3.1 */ - @SuppressWarnings("unchecked") public static Predicate notNullPredicate() { return INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/NullPredicate.java b/src/main/java/org/apache/commons/collections4/functors/NullPredicate.java index 5c9c43a3d..9230dbb46 100644 --- a/src/main/java/org/apache/commons/collections4/functors/NullPredicate.java +++ b/src/main/java/org/apache/commons/collections4/functors/NullPredicate.java @@ -41,7 +41,6 @@ public final class NullPredicate implements Predicate, Serializable { * @return the singleton instance * @since 3.1 */ - @SuppressWarnings("unchecked") public static Predicate nullPredicate() { return INSTANCE; } diff --git a/src/main/java/org/apache/commons/collections4/functors/TruePredicate.java b/src/main/java/org/apache/commons/collections4/functors/TruePredicate.java index 2a899a415..f82d1521a 100644 --- a/src/main/java/org/apache/commons/collections4/functors/TruePredicate.java +++ b/src/main/java/org/apache/commons/collections4/functors/TruePredicate.java @@ -41,7 +41,6 @@ public final class TruePredicate implements Predicate, Serializable { * @return the singleton instance * @since 3.1 */ - @SuppressWarnings("unchecked") public static Predicate truePredicate() { return INSTANCE; }