The following issues were found

guava/src/com/google/common/eventbus/DeadEvent.java
3 issues
Potential violation of Law of Demeter (method chain calls)
Design

Line: 69

              
  @Override
  public String toString() {
    return MoreObjects.toStringHelper(this).add("source", source).add("event", event).toString();
  }
}

            

Reported by PMD.

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

Line: 69

              
  @Override
  public String toString() {
    return MoreObjects.toStringHelper(this).add("source", source).add("event", event).toString();
  }
}

            

Reported by PMD.

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

Line: 69

              
  @Override
  public String toString() {
    return MoreObjects.toStringHelper(this).add("source", source).add("event", event).toString();
  }
}

            

Reported by PMD.

guava/src/com/google/common/collect/JdkBackedImmutableSet.java
3 issues
Classes implementing Serializable should set a serialVersionUID
Error

Line: 30

               */
@GwtCompatible(serializable = true)
@ElementTypesAreNonnullByDefault
final class JdkBackedImmutableSet<E> extends IndexedImmutableSet<E> {
  private final Set<?> delegate;
  private final ImmutableList<E> delegateList;

  JdkBackedImmutableSet(Set<?> delegate, ImmutableList<E> delegateList) {
    this.delegate = delegate;

            

Reported by PMD.

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

Line: 31

              @GwtCompatible(serializable = true)
@ElementTypesAreNonnullByDefault
final class JdkBackedImmutableSet<E> extends IndexedImmutableSet<E> {
  private final Set<?> delegate;
  private final ImmutableList<E> delegateList;

  JdkBackedImmutableSet(Set<?> delegate, ImmutableList<E> delegateList) {
    this.delegate = delegate;
    this.delegateList = delegateList;

            

Reported by PMD.

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

Line: 32

              @ElementTypesAreNonnullByDefault
final class JdkBackedImmutableSet<E> extends IndexedImmutableSet<E> {
  private final Set<?> delegate;
  private final ImmutableList<E> delegateList;

  JdkBackedImmutableSet(Set<?> delegate, ImmutableList<E> delegateList) {
    this.delegate = delegate;
    this.delegateList = delegateList;
  }

            

Reported by PMD.

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

Line: 50

              
  @Override
  public List<V> get(@ParametricNullness K key) {
    return delegate().get(key);
  }

  @CanIgnoreReturnValue
  @Override
  public List<V> removeAll(@CheckForNull Object key) {

            

Reported by PMD.

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

Line: 56

                @CanIgnoreReturnValue
  @Override
  public List<V> removeAll(@CheckForNull Object key) {
    return delegate().removeAll(key);
  }

  @CanIgnoreReturnValue
  @Override
  public List<V> replaceValues(@ParametricNullness K key, Iterable<? extends V> values) {

            

Reported by PMD.

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

Line: 62

                @CanIgnoreReturnValue
  @Override
  public List<V> replaceValues(@ParametricNullness K key, Iterable<? extends V> values) {
    return delegate().replaceValues(key, values);
  }
}

            

Reported by PMD.

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

Line: 52

              
  @Override
  public boolean hasNext() {
    return delegate().hasNext();
  }

  @CanIgnoreReturnValue
  @Override
  @ParametricNullness

            

Reported by PMD.

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

Line: 59

                @Override
  @ParametricNullness
  public T next() {
    return delegate().next();
  }

  @Override
  public void remove() {
    delegate().remove();

            

Reported by PMD.

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

Line: 64

              
  @Override
  public void remove() {
    delegate().remove();
  }
}

            

Reported by PMD.

guava/src/com/google/common/collect/ForwardingImmutableSet.java
3 issues
A class which only has private constructors should be final
Design

Line: 28

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ForwardingImmutableSet<E> {
  private ForwardingImmutableSet() {}
}

            

Reported by PMD.

Class cannot be instantiated and does not provide any static methods or fields
Error

Line: 28

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ForwardingImmutableSet<E> {
  private ForwardingImmutableSet() {}
}

            

Reported by PMD.

This abstract class does not have any abstract methods
Design

Line: 28

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ForwardingImmutableSet<E> {
  private ForwardingImmutableSet() {}
}

            

Reported by PMD.

guava/src/com/google/common/collect/ForwardingImmutableMap.java
3 issues
A class which only has private constructors should be final
Design

Line: 28

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ForwardingImmutableMap<K, V> {
  private ForwardingImmutableMap() {}
}

            

Reported by PMD.

Class cannot be instantiated and does not provide any static methods or fields
Error

Line: 28

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ForwardingImmutableMap<K, V> {
  private ForwardingImmutableMap() {}
}

            

Reported by PMD.

This abstract class does not have any abstract methods
Design

Line: 28

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ForwardingImmutableMap<K, V> {
  private ForwardingImmutableMap() {}
}

            

Reported by PMD.

guava/src/com/google/common/collect/ForwardingImmutableList.java
3 issues
A class which only has private constructors should be final
Design

Line: 28

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ForwardingImmutableList<E> {
  private ForwardingImmutableList() {}
}

            

Reported by PMD.

Class cannot be instantiated and does not provide any static methods or fields
Error

Line: 28

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ForwardingImmutableList<E> {
  private ForwardingImmutableList() {}
}

            

Reported by PMD.

This abstract class does not have any abstract methods
Design

Line: 28

               */
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
abstract class ForwardingImmutableList<E> {
  private ForwardingImmutableList() {}
}

            

Reported by PMD.

guava/src/com/google/common/hash/AbstractHasher.java
3 issues
This class has too many methods, consider refactoring it.
Design

Line: 31

               */
@CanIgnoreReturnValue
@ElementTypesAreNonnullByDefault
abstract class AbstractHasher implements Hasher {
  @Override
  public final Hasher putBoolean(boolean b) {
    return putByte(b ? (byte) 1 : (byte) 0);
  }


            

Reported by PMD.

Too many control variables in the for statement
Design

Line: 49

              
  @Override
  public Hasher putUnencodedChars(CharSequence charSequence) {
    for (int i = 0, len = charSequence.length(); i < len; i++) {
      putChar(charSequence.charAt(i));
    }
    return this;
  }


            

Reported by PMD.

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

Line: 57

              
  @Override
  public Hasher putString(CharSequence charSequence, Charset charset) {
    return putBytes(charSequence.toString().getBytes(charset));
  }

  @Override
  public Hasher putBytes(byte[] bytes) {
    return putBytes(bytes, 0, bytes.length);

            

Reported by PMD.

guava/src/com/google/common/collect/EnumHashBiMap.java
3 issues
Field keyType has the same name as a method
Error

Line: 48

              @ElementTypesAreNonnullByDefault
public final class EnumHashBiMap<K extends Enum<K>, V extends @Nullable Object>
    extends AbstractBiMap<K, V> {
  private transient Class<K> keyType;

  /**
   * Returns a new, empty {@code EnumHashBiMap} using the specified key type.
   *
   * @param keyType the key type

            

Reported by PMD.

Potential violation of Law of Demeter (object not created locally)
Design

Line: 73

                public static <K extends Enum<K>, V extends @Nullable Object> EnumHashBiMap<K, V> create(
      Map<K, ? extends V> map) {
    EnumHashBiMap<K, V> bimap = create(EnumBiMap.inferKeyType(map));
    bimap.putAll(map);
    return bimap;
  }

  private EnumHashBiMap(Class<K> keyType) {
    super(

            

Reported by PMD.

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

Line: 131

                  stream.defaultReadObject();
    keyType = (Class<K>) stream.readObject();
    setDelegates(
        new EnumMap<K, V>(keyType), new HashMap<V, K>(keyType.getEnumConstants().length * 3 / 2));
    Serialization.populateMap(this, stream);
  }

  @GwtIncompatible // only needed in emulated source.
  private static final long serialVersionUID = 0;

            

Reported by PMD.

guava/src/com/google/common/hash/LongAddables.java
3 issues
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
Design

Line: 26

               * @author Louis Wasserman
 */
@ElementTypesAreNonnullByDefault
final class LongAddables {
  private static final Supplier<LongAddable> SUPPLIER;

  static {
    Supplier<LongAddable> supplier;
    try {

            

Reported by PMD.

A catch statement should never catch throwable since it includes errors.
Error

Line: 40

                            return new LongAdder();
            }
          };
    } catch (Throwable t) { // we really want to catch *everything*
      supplier =
          new Supplier<LongAddable>() {
            @Override
            public LongAddable get() {
              return new PureJavaLongAddable();

            

Reported by PMD.

Classes implementing Serializable should set a serialVersionUID
Error

Line: 56

                  return SUPPLIER.get();
  }

  private static final class PureJavaLongAddable extends AtomicLong implements LongAddable {
    @Override
    public void increment() {
      getAndIncrement();
    }


            

Reported by PMD.