The following issues were found

android/guava/src/com/google/common/base/FunctionalEquivalence.java
2 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

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.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

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
This abstract class does not have any abstract methods
Design

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.

Potential violation of Law of Demeter (method chain calls)
Design

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
In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead.
Error

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.

In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead.
Error

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
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead.
Design

Line: 25

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ShortsMethodsForWeb {}

            

Reported by PMD.

This abstract class does not have any abstract methods
Design

Line: 25

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ShortsMethodsForWeb {}

            

Reported by PMD.

android/guava/src/com/google/common/primitives/IntsMethodsForWeb.java
2 issues
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead.
Design

Line: 25

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class IntsMethodsForWeb {}

            

Reported by PMD.

This abstract class does not have any abstract methods
Design

Line: 25

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class IntsMethodsForWeb {}

            

Reported by PMD.

android/guava/src/com/google/common/primitives/FloatsMethodsForWeb.java
2 issues
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead.
Design

Line: 25

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class FloatsMethodsForWeb {}

            

Reported by PMD.

This abstract class does not have any abstract methods
Design

Line: 25

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class FloatsMethodsForWeb {}

            

Reported by PMD.

android/guava/src/com/google/common/primitives/DoublesMethodsForWeb.java
2 issues
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead.
Design

Line: 25

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class DoublesMethodsForWeb {}

            

Reported by PMD.

This abstract class does not have any abstract methods
Design

Line: 25

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class DoublesMethodsForWeb {}

            

Reported by PMD.

android/guava/src/com/google/common/math/BigDecimalMath.java
2 issues
Potential violation of Law of Demeter (static property access)
Design

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.

Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal
Error

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
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

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.

Potential violation of Law of Demeter (method chain calls)
Design

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
A method/constructor should not explicitly throw java.lang.Exception
Design

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.

Avoid unused imports such as 'java.util.concurrent.Future'
Design

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.