mobius
mobius copied to clipboard
redundant cast
There is an redundant cast in the file com.spotify.mobius.Effects:
public static <F, G extends F> Set<F> effects(G... effects) {
Set<F> result = new HashSet<>(effects.length);
Collections.addAll(result, (F[]) Preconditions.checkArrayNoNulls((F[]) effects));
return result;
}
In this context, the cast does not make sense, and therefore can be written as follows:
public static <F, G extends F> Set<F> effects(G... effects) {
Set<F> result = new HashSet<>(effects.length);
Collections.addAll(result, Preconditions.checkArrayNoNulls((F[]) effects));
return result;
}