The following issues were found

guava-tests/test/com/google/common/collect/MultimapsTransformValuesAsMapTest.java
2 issues
Potential violation of Law of Demeter (method chain calls)
Design

Line: 38

              
  @Override
  protected Map<String, Collection<Integer>> makeEmptyMap() {
    return Multimaps.transformValues(
            ArrayListMultimap.<String, Integer>create(), Functions.<Integer>identity())
        .asMap();
  }

  @Override

            

Reported by PMD.

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

Line: 47

                protected Map<String, Collection<Integer>> makePopulatedMap() {
    ListMultimap<String, Integer> delegate = ArrayListMultimap.create();
    populate(delegate);
    return Multimaps.transformValues(delegate, Functions.<Integer>identity()).asMap();
  }
}

            

Reported by PMD.

guava-testlib/src/com/google/common/collect/testing/testers/CollectionIsEmptyTester.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: 35

              @GwtCompatible
@Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
public class CollectionIsEmptyTester<E> extends AbstractCollectionTester<E> {
  @CollectionSize.Require(ZERO)
  public void testIsEmpty_yes() {
    assertTrue("isEmpty() should return true", collection.isEmpty());
  }

  @CollectionSize.Require(absent = ZERO)

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 40

                  assertTrue("isEmpty() should return true", collection.isEmpty());
  }

  @CollectionSize.Require(absent = ZERO)
  public void testIsEmpty_no() {
    assertFalse("isEmpty() should return false", collection.isEmpty());
  }
}

            

Reported by PMD.

guava-testlib/src/com/google/common/collect/testing/testers/CollectionForEachTester.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: 39

              @GwtCompatible
@Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
public class CollectionForEachTester<E> extends AbstractCollectionTester<E> {
  @CollectionFeature.Require(absent = KNOWN_ORDER)
  public void testForEachUnknownOrder() {
    List<E> elements = new ArrayList<E>();
    collection.forEach(elements::add);
    Helpers.assertEqualIgnoringOrder(Arrays.asList(createSamplesArray()), elements);
  }

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 46

                  Helpers.assertEqualIgnoringOrder(Arrays.asList(createSamplesArray()), elements);
  }

  @CollectionFeature.Require(KNOWN_ORDER)
  public void testForEachKnownOrder() {
    List<E> elements = new ArrayList<E>();
    collection.forEach(elements::add);
    List<E> expected = Helpers.copyToList(getOrderedElements());
    assertEquals("Different ordered iteration", expected, elements);

            

Reported by PMD.

guava-testlib/src/com/google/common/collect/testing/testers/ListHashCodeTester.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: 33

              @GwtCompatible(emulated = true)
@Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
public class ListHashCodeTester<E> extends AbstractListTester<E> {
  public void testHashCode() {
    int expectedHashCode = 1;
    for (E element : getOrderedElements()) {
      expectedHashCode = 31 * expectedHashCode + ((element == null) ? 0 : element.hashCode());
    }
    assertEquals(

            

Reported by PMD.

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

Line: 41

                  assertEquals(
        "A List's hashCode() should be computed from those of its elements.",
        expectedHashCode,
        getList().hashCode());
  }

  /**
   * Returns the {@link Method} instance for {@link #testHashCode()} so that list tests on
   * unhashable objects can suppress it with {@code FeatureSpecificTestSuiteBuilder.suppressing()}.

            

Reported by PMD.

guava-tests/test/com/google/common/collect/RangeNonGwtTest.java
2 issues
JUnit tests should include assert() or fail()
Design

Line: 30

               */
public class RangeNonGwtTest extends TestCase {

  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();

    tester.testAllPublicStaticMethods(Range.class);
    tester.testAllPublicStaticMethods(Range.class);


            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 30

               */
public class RangeNonGwtTest extends TestCase {

  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();

    tester.testAllPublicStaticMethods(Range.class);
    tester.testAllPublicStaticMethods(Range.class);


            

Reported by PMD.

android/guava-testlib/test/com/google/common/testing/RelationshipTesterTest.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: 29

               */
public class RelationshipTesterTest extends TestCase {

  public void testNulls() {
    new ClassSanityTester()
        .setDefault(ItemReporter.class, new ItemReporter())
        .testNulls(RelationshipTester.class);
  }
}

            

Reported by PMD.

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

Line: 29

               */
public class RelationshipTesterTest extends TestCase {

  public void testNulls() {
    new ClassSanityTester()
        .setDefault(ItemReporter.class, new ItemReporter())
        .testNulls(RelationshipTester.class);
  }
}

            

Reported by PMD.

android/guava-testlib/test/com/google/common/collect/testing/OpenJdk6Tests.java
2 issues
This class name ends with Test but contains no test cases
Error

Line: 30

               *
 * @author Kevin Bourrillion
 */
public class OpenJdk6Tests extends TestCase {
  public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTest(OpenJdk6SetTests.suite());
    suite.addTest(OpenJdk6ListTests.suite());
    suite.addTest(OpenJdk6QueueTests.suite());

            

Reported by PMD.

JUnit 4 indicates test suites via annotations, not the suite method.
Design

Line: 31

               * @author Kevin Bourrillion
 */
public class OpenJdk6Tests extends TestCase {
  public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTest(OpenJdk6SetTests.suite());
    suite.addTest(OpenJdk6ListTests.suite());
    suite.addTest(OpenJdk6QueueTests.suite());
    suite.addTest(OpenJdk6MapTests.suite());

            

Reported by PMD.

android/guava-tests/test/com/google/common/collect/RangeNonGwtTest.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: 30

               */
public class RangeNonGwtTest extends TestCase {

  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();

    tester.testAllPublicStaticMethods(Range.class);
    tester.testAllPublicStaticMethods(Range.class);


            

Reported by PMD.

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

Line: 30

               */
public class RangeNonGwtTest extends TestCase {

  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();

    tester.testAllPublicStaticMethods(Range.class);
    tester.testAllPublicStaticMethods(Range.class);


            

Reported by PMD.

android/guava-tests/test/com/google/common/collect/MultimapsTransformValuesAsMapTest.java
2 issues
Potential violation of Law of Demeter (method chain calls)
Design

Line: 38

              
  @Override
  protected Map<String, Collection<Integer>> makeEmptyMap() {
    return Multimaps.transformValues(
            ArrayListMultimap.<String, Integer>create(), Functions.<Integer>identity())
        .asMap();
  }

  @Override

            

Reported by PMD.

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

Line: 47

                protected Map<String, Collection<Integer>> makePopulatedMap() {
    ListMultimap<String, Integer> delegate = ArrayListMultimap.create();
    populate(delegate);
    return Multimaps.transformValues(delegate, Functions.<Integer>identity()).asMap();
  }
}

            

Reported by PMD.

android/guava-tests/test/com/google/common/eventbus/StringCatcher.java
2 issues
Private field 'events' could be made final; it is only initialized in the declaration or constructor.
Design

Line: 33

               * @author Cliff Biffle
 */
public class StringCatcher {
  private List<String> events = Lists.newArrayList();

  @Subscribe
  public void hereHaveAString(@NullableDecl String string) {
    events.add(string);
  }

            

Reported by PMD.

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

Line: 33

               * @author Cliff Biffle
 */
public class StringCatcher {
  private List<String> events = Lists.newArrayList();

  @Subscribe
  public void hereHaveAString(@NullableDecl String string) {
    events.add(string);
  }

            

Reported by PMD.