The following issues were found
android/guava/src/com/google/common/base/FunctionalEquivalence.java
2 issues
Line: 37
private static final long serialVersionUID = 0;
private final Function<? super F, ? extends T> function;
private final Equivalence<T> resultEquivalence;
FunctionalEquivalence(
Function<? super F, ? extends T> function, Equivalence<T> resultEquivalence) {
this.function = checkNotNull(function);
Reported by PMD.
Line: 38
private static final long serialVersionUID = 0;
private final Function<? super F, ? extends T> function;
private final Equivalence<T> resultEquivalence;
FunctionalEquivalence(
Function<? super F, ? extends T> function, Equivalence<T> resultEquivalence) {
this.function = checkNotNull(function);
this.resultEquivalence = checkNotNull(resultEquivalence);
Reported by PMD.
android/guava/src/com/google/common/reflect/TypeCapture.java
2 issues
Line: 28
* @author Ben Yu
*/
@ElementTypesAreNonnullByDefault
abstract class TypeCapture<T> {
/** Returns the captured type. */
final Type capture() {
Type superclass = getClass().getGenericSuperclass();
checkArgument(superclass instanceof ParameterizedType, "%s isn't parameterized", superclass);
Reported by PMD.
Line: 32
/** Returns the captured type. */
final Type capture() {
Type superclass = getClass().getGenericSuperclass();
checkArgument(superclass instanceof ParameterizedType, "%s isn't parameterized", superclass);
return ((ParameterizedType) superclass).getActualTypeArguments()[0];
}
}
Reported by PMD.
android/guava/src/com/google/common/reflect/Reflection.java
2 issues
Line: 66
public static void initialize(Class<?>... classes) {
for (Class<?> clazz : classes) {
try {
Class.forName(clazz.getName(), true, clazz.getClassLoader());
} catch (ClassNotFoundException e) {
throw new AssertionError(e);
}
}
}
Reported by PMD.
Line: 87
checkArgument(interfaceType.isInterface(), "%s is not an interface", interfaceType);
Object object =
Proxy.newProxyInstance(
interfaceType.getClassLoader(), new Class<?>[] {interfaceType}, handler);
return interfaceType.cast(object);
}
private Reflection() {}
}
Reported by PMD.
android/guava/src/com/google/common/primitives/ShortsMethodsForWeb.java
2 issues
Line: 25
*/
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ShortsMethodsForWeb {}
Reported by PMD.
Line: 25
*/
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ShortsMethodsForWeb {}
Reported by PMD.
android/guava/src/com/google/common/primitives/IntsMethodsForWeb.java
2 issues
Line: 25
*/
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class IntsMethodsForWeb {}
Reported by PMD.
Line: 25
*/
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class IntsMethodsForWeb {}
Reported by PMD.
android/guava/src/com/google/common/primitives/FloatsMethodsForWeb.java
2 issues
Line: 25
*/
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class FloatsMethodsForWeb {}
Reported by PMD.
Line: 25
*/
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class FloatsMethodsForWeb {}
Reported by PMD.
android/guava/src/com/google/common/primitives/DoublesMethodsForWeb.java
2 issues
Line: 25
*/
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class DoublesMethodsForWeb {}
Reported by PMD.
Line: 25
*/
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class DoublesMethodsForWeb {}
Reported by PMD.
android/guava/src/com/google/common/math/BigDecimalMath.java
2 issues
Line: 54
* @since 30.0
*/
public static double roundToDouble(BigDecimal x, RoundingMode mode) {
return BigDecimalToDoubleRounder.INSTANCE.roundToDouble(x, mode);
}
private static class BigDecimalToDoubleRounder extends ToDoubleRounder<BigDecimal> {
static final BigDecimalToDoubleRounder INSTANCE = new BigDecimalToDoubleRounder();
Reported by PMD.
Line: 74
@Override
BigDecimal toX(double d, RoundingMode mode) {
return new BigDecimal(d);
}
@Override
BigDecimal minus(BigDecimal a, BigDecimal b) {
return a.subtract(b);
Reported by PMD.
android/guava/src/com/google/common/io/PatternFilenameFilter.java
2 issues
Line: 37
@ElementTypesAreNonnullByDefault
public final class PatternFilenameFilter implements FilenameFilter {
private final Pattern pattern;
/**
* Constructs a pattern file name filter object.
*
* @param patternStr the pattern string on which to filter file names
Reported by PMD.
Line: 73
*/
@Override
public boolean accept(File dir, String fileName) {
return pattern.matcher(fileName).matches();
}
}
Reported by PMD.
android/guava/src/com/google/common/util/concurrent/AsyncCallable.java
2 issues
Line: 42
* <p>Throwing an exception from this method is equivalent to returning a failing {@link
* ListenableFuture}.
*/
ListenableFuture<V> call() throws Exception;
}
Reported by PMD.
Line: 19
import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import java.util.concurrent.Future;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Computes a value, possibly asynchronously. For an example usage and more information, see {@link
* Futures.FutureCombiner#callAsync(AsyncCallable, java.util.concurrent.Executor)}.
Reported by PMD.