Remove: Unnecessary @SuppressWarnings("unchecked").

This commit is contained in:
Gary Gregory 2019-07-05 12:56:01 -04:00
parent 291414cd57
commit a434957f70
16 changed files with 0 additions and 16 deletions

View File

@ -66,7 +66,6 @@ public class ChainedTransformer<T> implements Transformer<T, T>, Serializable {
* @throws NullPointerException if the transformers collection is null
* @throws NullPointerException if any transformer in the collection is null
*/
@SuppressWarnings("unchecked")
public static <T> Transformer<T, T> chainedTransformer(
final Collection<? extends Transformer<? super T, ? extends T>> transformers) {
if (transformers == null) {

View File

@ -45,7 +45,6 @@ public class CloneTransformer<T> implements Transformer<T, T> {
* @return the singleton instance
* @since 3.1
*/
@SuppressWarnings("unchecked") // the singleton instance works for all types
public static <T> Transformer<T, T> cloneTransformer() {
return INSTANCE;
}

View File

@ -49,7 +49,6 @@ public class ConstantFactory<T> implements Factory<T>, Serializable {
* @param constantToReturn the constant object to return each time in the factory
* @return the <code>constant</code> factory.
*/
@SuppressWarnings("unchecked") // The null factory works for all object types
public static <T> Factory<T> constantFactory(final T constantToReturn) {
if (constantToReturn == null) {
return NULL_INSTANCE;

View File

@ -49,7 +49,6 @@ public class ConstantTransformer<I, O> implements Transformer<I, O>, Serializabl
* @param <O> the output type
* @return Transformer&lt;I, O&gt; that always returns null.
*/
@SuppressWarnings("unchecked") // The null transformer works for all object types
public static <I, O> Transformer<I, O> nullTransformer() {
return NULL_INSTANCE;
}

View File

@ -46,7 +46,6 @@ public class DefaultEquator<T> implements Equator<T>, Serializable {
* @param <T> the object type
* @return the singleton instance
*/
@SuppressWarnings("unchecked") // the static instance works for all types
public static <T> DefaultEquator<T> defaultEquator() {
return DefaultEquator.INSTANCE;
}

View File

@ -42,7 +42,6 @@ public final class ExceptionClosure<E> implements Closure<E>, Serializable {
* @return the singleton instance
* @since 3.1
*/
@SuppressWarnings("unchecked") // the static instance works for all types
public static <E> Closure<E> exceptionClosure() {
return INSTANCE;
}

View File

@ -42,7 +42,6 @@ public final class ExceptionFactory<T> implements Factory<T>, Serializable {
* @return the singleton instance
* @since 3.1
*/
@SuppressWarnings("unchecked") // the static instance works for all types
public static <T> Factory<T> exceptionFactory() {
return INSTANCE;
}

View File

@ -42,7 +42,6 @@ public final class ExceptionPredicate<T> implements Predicate<T>, Serializable {
* @return the singleton instance
* @since 3.1
*/
@SuppressWarnings("unchecked") // the static instance works for all types
public static <T> Predicate<T> exceptionPredicate() {
return INSTANCE;
}

View File

@ -43,7 +43,6 @@ public final class ExceptionTransformer<I, O> implements Transformer<I, O>, Seri
* @return the singleton instance
* @since 3.1
*/
@SuppressWarnings("unchecked") // the static instance works for all types
public static <I, O> Transformer<I, O> exceptionTransformer() {
return INSTANCE;
}

View File

@ -41,7 +41,6 @@ public final class FalsePredicate<T> implements Predicate<T>, Serializable {
* @return the singleton instance
* @since 4.0
*/
@SuppressWarnings("unchecked") // the static instance works for all types
public static <T> Predicate<T> falsePredicate() {
return INSTANCE;
}

View File

@ -50,7 +50,6 @@ public class InstantiateTransformer<T> implements Transformer<Class<? extends T>
* @param <T> the type of the objects to be created
* @return Transformer&lt;Class&lt;? extends T&gt;, T&gt;
*/
@SuppressWarnings("unchecked")
public static <T> Transformer<Class<? extends T>, T> instantiateTransformer() {
return NO_ARG_INSTANCE;
}

View File

@ -41,7 +41,6 @@ public final class NOPClosure<E> implements Closure<E>, Serializable {
* @return the singleton instance
* @since 3.1
*/
@SuppressWarnings("unchecked")
public static <E> Closure<E> nopClosure() {
return INSTANCE;
}

View File

@ -41,7 +41,6 @@ public class NOPTransformer<T> implements Transformer<T, T>, Serializable {
* @return the singleton instance
* @since 3.1
*/
@SuppressWarnings("unchecked")
public static <T> Transformer<T, T> nopTransformer() {
return INSTANCE;
}

View File

@ -41,7 +41,6 @@ public final class NotNullPredicate<T> implements Predicate<T>, Serializable {
* @return the singleton instance
* @since 3.1
*/
@SuppressWarnings("unchecked")
public static <T> Predicate<T> notNullPredicate() {
return INSTANCE;
}

View File

@ -41,7 +41,6 @@ public final class NullPredicate<T> implements Predicate<T>, Serializable {
* @return the singleton instance
* @since 3.1
*/
@SuppressWarnings("unchecked")
public static <T> Predicate<T> nullPredicate() {
return INSTANCE;
}

View File

@ -41,7 +41,6 @@ public final class TruePredicate<T> implements Predicate<T>, Serializable {
* @return the singleton instance
* @since 3.1
*/
@SuppressWarnings("unchecked")
public static <T> Predicate<T> truePredicate() {
return INSTANCE;
}