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 the transformers collection is null
* @throws NullPointerException if any transformer in the collection is null * @throws NullPointerException if any transformer in the collection is null
*/ */
@SuppressWarnings("unchecked")
public static <T> Transformer<T, T> chainedTransformer( public static <T> Transformer<T, T> chainedTransformer(
final Collection<? extends Transformer<? super T, ? extends T>> transformers) { final Collection<? extends Transformer<? super T, ? extends T>> transformers) {
if (transformers == null) { if (transformers == null) {

View File

@ -45,7 +45,6 @@ public class CloneTransformer<T> implements Transformer<T, T> {
* @return the singleton instance * @return the singleton instance
* @since 3.1 * @since 3.1
*/ */
@SuppressWarnings("unchecked") // the singleton instance works for all types
public static <T> Transformer<T, T> cloneTransformer() { public static <T> Transformer<T, T> cloneTransformer() {
return INSTANCE; 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 * @param constantToReturn the constant object to return each time in the factory
* @return the <code>constant</code> 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) { public static <T> Factory<T> constantFactory(final T constantToReturn) {
if (constantToReturn == null) { if (constantToReturn == null) {
return NULL_INSTANCE; return NULL_INSTANCE;

View File

@ -49,7 +49,6 @@ public class ConstantTransformer<I, O> implements Transformer<I, O>, Serializabl
* @param <O> the output type * @param <O> the output type
* @return Transformer&lt;I, O&gt; that always returns null. * @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() { public static <I, O> Transformer<I, O> nullTransformer() {
return NULL_INSTANCE; return NULL_INSTANCE;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -41,7 +41,6 @@ public final class FalsePredicate<T> implements Predicate<T>, Serializable {
* @return the singleton instance * @return the singleton instance
* @since 4.0 * @since 4.0
*/ */
@SuppressWarnings("unchecked") // the static instance works for all types
public static <T> Predicate<T> falsePredicate() { public static <T> Predicate<T> falsePredicate() {
return INSTANCE; 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 * @param <T> the type of the objects to be created
* @return Transformer&lt;Class&lt;? extends T&gt;, T&gt; * @return Transformer&lt;Class&lt;? extends T&gt;, T&gt;
*/ */
@SuppressWarnings("unchecked")
public static <T> Transformer<Class<? extends T>, T> instantiateTransformer() { public static <T> Transformer<Class<? extends T>, T> instantiateTransformer() {
return NO_ARG_INSTANCE; return NO_ARG_INSTANCE;
} }

View File

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

View File

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

View File

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

View File

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

View File

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