The following issues were found

guava-tests/test/com/google/common/util/concurrent/ForwardingBlockingDequeTest.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 28

               */
public class ForwardingBlockingDequeTest extends TestCase {

  public void testForwarding() {
    ForwardingObjectTester.testForwardingObject(ForwardingBlockingDeque.class);
  }
}

            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 28

               */
public class ForwardingBlockingDequeTest extends TestCase {

  public void testForwarding() {
    ForwardingObjectTester.testForwardingObject(ForwardingBlockingDeque.class);
  }
}

            

Reported by PMD.

guava/src/com/google/common/collect/ImmutableMultisetGwtSerializationDependencies.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: 41

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ImmutableMultisetGwtSerializationDependencies<E> extends ImmutableCollection<E> {}

            

Reported by PMD.

Classes implementing Serializable should set a serialVersionUID
Error

Line: 41

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ImmutableMultisetGwtSerializationDependencies<E> extends ImmutableCollection<E> {}

            

Reported by PMD.

guava/src/com/google/common/io/InsecureRecursiveDeleteException.java
2 issues
Classes implementing Serializable should set a serialVersionUID
Error

Line: 42

              @GwtIncompatible
@J2ObjCIncompatible // java.nio.file
@ElementTypesAreNonnullByDefault
public final class InsecureRecursiveDeleteException extends FileSystemException {

  public InsecureRecursiveDeleteException(@CheckForNull String file) {
    super(file, null, "unable to guarantee security of recursive delete");
  }
}

            

Reported by PMD.

Avoid unused imports such as 'java.nio.file.SecureDirectoryStream'
Design

Line: 23

              import com.google.common.annotations.GwtIncompatible;
import com.google.j2objc.annotations.J2ObjCIncompatible;
import java.nio.file.FileSystemException;
import java.nio.file.SecureDirectoryStream;
import javax.annotation.CheckForNull;

/**
 * Exception indicating that a recursive delete can't be performed because the file system does not
 * have the support necessary to guarantee that it is not vulnerable to race conditions that would

            

Reported by PMD.

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

Line: 36

              @ElementTypesAreNonnullByDefault
final class ByFunctionOrdering<F extends @Nullable Object, T extends @Nullable Object>
    extends Ordering<F> implements Serializable {
  final Function<F, ? extends T> function;
  final Ordering<T> ordering;

  ByFunctionOrdering(Function<F, ? extends T> function, Ordering<T> ordering) {
    this.function = checkNotNull(function);
    this.ordering = checkNotNull(ordering);

            

Reported by PMD.

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

Line: 37

              final class ByFunctionOrdering<F extends @Nullable Object, T extends @Nullable Object>
    extends Ordering<F> implements Serializable {
  final Function<F, ? extends T> function;
  final Ordering<T> ordering;

  ByFunctionOrdering(Function<F, ? extends T> function, Ordering<T> ordering) {
    this.function = checkNotNull(function);
    this.ordering = checkNotNull(ordering);
  }

            

Reported by PMD.

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

Line: 37

              @GwtIncompatible
@ElementTypesAreNonnullByDefault
class AppendableWriter extends Writer {
  private final Appendable target;
  private boolean closed;

  /**
   * Creates a new writer that appends everything it writes to {@code target}.
   *

            

Reported by PMD.

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

Line: 38

              @ElementTypesAreNonnullByDefault
class AppendableWriter extends Writer {
  private final Appendable target;
  private boolean closed;

  /**
   * Creates a new writer that appends everything it writes to {@code target}.
   *
   * @param target target to which to append output

            

Reported by PMD.

guava/src/com/google/common/collect/ForwardingSet.java
2 issues
Potential violation of Law of Demeter (method chain calls)
Design

Line: 63

              
  @Override
  public boolean equals(@CheckForNull Object object) {
    return object == this || delegate().equals(object);
  }

  @Override
  public int hashCode() {
    return delegate().hashCode();

            

Reported by PMD.

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

Line: 68

              
  @Override
  public int hashCode() {
    return delegate().hashCode();
  }

  /**
   * A sensible definition of {@link #removeAll} in terms of {@link #iterator} and {@link #remove}.
   * If you override {@code iterator} or {@code remove}, you may wish to override {@link #removeAll}

            

Reported by PMD.

guava/src/com/google/common/util/concurrent/AsyncCallable.java
2 issues
A method/constructor should not explicitly throw java.lang.Exception
Design

Line: 43

                 * <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.

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.

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

Line: 37

              @ElementTypesAreNonnullByDefault
abstract class AbstractIndexedListIterator<E extends @Nullable Object>
    extends UnmodifiableListIterator<E> {
  private final int size;
  private int position;

  /** Returns the element with the specified index. This method is called by {@link #next()}. */
  @ParametricNullness
  protected abstract E get(int index);

            

Reported by PMD.

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

Line: 38

              abstract class AbstractIndexedListIterator<E extends @Nullable Object>
    extends UnmodifiableListIterator<E> {
  private final int size;
  private int position;

  /** Returns the element with the specified index. This method is called by {@link #next()}. */
  @ParametricNullness
  protected abstract E get(int index);


            

Reported by PMD.

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.