The following issues were found

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

Line: 52

              
  @Override
  public void add(@ParametricNullness E element) {
    delegate().add(element);
  }

  @Override
  public boolean hasPrevious() {
    return delegate().hasPrevious();

            

Reported by PMD.

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

Line: 57

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

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

            

Reported by PMD.

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

Line: 62

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

  @CanIgnoreReturnValue
  @Override
  @ParametricNullness

            

Reported by PMD.

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

Line: 69

                @Override
  @ParametricNullness
  public E previous() {
    return delegate().previous();
  }

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

            

Reported by PMD.

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

Line: 74

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

  @Override
  public void set(@ParametricNullness E element) {
    delegate().set(element);

            

Reported by PMD.

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

Line: 79

              
  @Override
  public void set(@ParametricNullness E element) {
    delegate().set(element);
  }
}

            

Reported by PMD.

android/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java
6 issues
Classes implementing Serializable should set a serialVersionUID
Error

Line: 40

              @Immutable(containerOf = "B")
@GwtIncompatible
@ElementTypesAreNonnullByDefault
public final class ImmutableClassToInstanceMap<B> extends ForwardingMap<Class<? extends B>, B>
    implements ClassToInstanceMap<B>, Serializable {

  private static final ImmutableClassToInstanceMap<Object> EMPTY =
      new ImmutableClassToInstanceMap<>(ImmutableMap.<Class<?>, Object>of());


            

Reported by PMD.

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

Line: 94

                 * @since 2.0
   */
  public static final class Builder<B> {
    private final ImmutableMap.Builder<Class<? extends B>, B> mapBuilder = ImmutableMap.builder();

    /**
     * Associates {@code key} with {@code value} in the built map. Duplicate keys are not allowed,
     * and will cause {@link #build} to fail.
     */

            

Reported by PMD.

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

Line: 124

                  }

    private static <B, T extends B> T cast(Class<T> type, B value) {
      return Primitives.wrap(type).cast(value);
    }

    /**
     * Returns a new immutable class-to-instance map containing the entries provided to this
     * builder.

            

Reported by PMD.

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

Line: 135

                   */
    public ImmutableClassToInstanceMap<B> build() {
      ImmutableMap<Class<? extends B>, B> map = mapBuilder.build();
      if (map.isEmpty()) {
        return of();
      } else {
        return new ImmutableClassToInstanceMap<B>(map);
      }
    }

            

Reported by PMD.

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

Line: 164

                  return new Builder<B>().putAll(map).build();
  }

  private final ImmutableMap<Class<? extends B>, B> delegate;

  private ImmutableClassToInstanceMap(ImmutableMap<Class<? extends B>, B> delegate) {
    this.delegate = delegate;
  }


            

Reported by PMD.

Field delegate has the same name as a method
Error

Line: 164

                  return new Builder<B>().putAll(map).build();
  }

  private final ImmutableMap<Class<? extends B>, B> delegate;

  private ImmutableClassToInstanceMap(ImmutableMap<Class<? extends B>, B> delegate) {
    this.delegate = delegate;
  }


            

Reported by PMD.

android/guava/src/com/google/common/collect/ImmutableEnumMap.java
6 issues
Avoid reassigning parameters such as 'object'
Design

Line: 77

                }

  @Override
  public boolean equals(@CheckForNull Object object) {
    if (object == this) {
      return true;
    }
    if (object instanceof ImmutableEnumMap) {
      object = ((ImmutableEnumMap<?, ?>) object).delegate;

            

Reported by PMD.

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

Line: 42

                      return ImmutableMap.of();
      case 1:
        Entry<K, V> entry = Iterables.getOnlyElement(map.entrySet());
        return ImmutableMap.of(entry.getKey(), entry.getValue());
      default:
        return new ImmutableEnumMap<>(map);
    }
  }


            

Reported by PMD.

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

Line: 42

                      return ImmutableMap.of();
      case 1:
        Entry<K, V> entry = Iterables.getOnlyElement(map.entrySet());
        return ImmutableMap.of(entry.getKey(), entry.getValue());
      default:
        return new ImmutableEnumMap<>(map);
    }
  }


            

Reported by PMD.

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

Line: 57

              
  @Override
  UnmodifiableIterator<K> keyIterator() {
    return Iterators.unmodifiableIterator(delegate.keySet().iterator());
  }

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

            

Reported by PMD.

Ensure you override both equals() and hashCode()
Error

Line: 77

                }

  @Override
  public boolean equals(@CheckForNull Object object) {
    if (object == this) {
      return true;
    }
    if (object instanceof ImmutableEnumMap) {
      object = ((ImmutableEnumMap<?, ?>) object).delegate;

            

Reported by PMD.

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

Line: 89

              
  @Override
  UnmodifiableIterator<Entry<K, V>> entryIterator() {
    return Maps.unmodifiableEntryIterator(delegate.entrySet().iterator());
  }

  @Override
  boolean isPartialView() {
    return false;

            

Reported by PMD.

android/guava/src/com/google/common/util/concurrent/ForwardingLock.java
6 issues
Potential violation of Law of Demeter (method chain calls)
Design

Line: 28

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

  @Override
  public void lockInterruptibly() throws InterruptedException {
    delegate().lockInterruptibly();

            

Reported by PMD.

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

Line: 33

              
  @Override
  public void lockInterruptibly() throws InterruptedException {
    delegate().lockInterruptibly();
  }

  @Override
  public boolean tryLock() {
    return delegate().tryLock();

            

Reported by PMD.

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

Line: 38

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

  @Override
  public boolean tryLock(long time, TimeUnit unit) throws InterruptedException {
    return delegate().tryLock(time, unit);

            

Reported by PMD.

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

Line: 43

              
  @Override
  public boolean tryLock(long time, TimeUnit unit) throws InterruptedException {
    return delegate().tryLock(time, unit);
  }

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

            

Reported by PMD.

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

Line: 48

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

  @Override
  public Condition newCondition() {
    return delegate().newCondition();

            

Reported by PMD.

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

Line: 53

              
  @Override
  public Condition newCondition() {
    return delegate().newCondition();
  }
}

            

Reported by PMD.

android/guava/src/com/google/common/hash/Funnels.java
6 issues
Classes implementing Serializable should set a serialVersionUID
Error

Line: 90

                  return new StringCharsetFunnel(charset);
  }

  private static class StringCharsetFunnel implements Funnel<CharSequence>, Serializable {
    private final Charset charset;

    StringCharsetFunnel(Charset charset) {
      this.charset = Preconditions.checkNotNull(charset);
    }

            

Reported by PMD.

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

Line: 91

                }

  private static class StringCharsetFunnel implements Funnel<CharSequence>, Serializable {
    private final Charset charset;

    StringCharsetFunnel(Charset charset) {
      this.charset = Preconditions.checkNotNull(charset);
    }


            

Reported by PMD.

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

Line: 126

                  }

    private static class SerializedForm implements Serializable {
      private final String charsetCanonicalName;

      SerializedForm(Charset charset) {
        this.charsetCanonicalName = charset.name();
      }


            

Reported by PMD.

Classes implementing Serializable should set a serialVersionUID
Error

Line: 174

                  return new SequentialFunnel<E>(elementFunnel);
  }

  private static class SequentialFunnel<E extends @Nullable Object>
      implements Funnel<Iterable<? extends E>>, Serializable {
    private final Funnel<E> elementFunnel;

    SequentialFunnel(Funnel<E> elementFunnel) {
      this.elementFunnel = Preconditions.checkNotNull(elementFunnel);

            

Reported by PMD.

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

Line: 176

              
  private static class SequentialFunnel<E extends @Nullable Object>
      implements Funnel<Iterable<? extends E>>, Serializable {
    private final Funnel<E> elementFunnel;

    SequentialFunnel(Funnel<E> elementFunnel) {
      this.elementFunnel = Preconditions.checkNotNull(elementFunnel);
    }


            

Reported by PMD.

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

Line: 247

                }

  private static class SinkAsStream extends OutputStream {
    final PrimitiveSink sink;

    SinkAsStream(PrimitiveSink sink) {
      this.sink = Preconditions.checkNotNull(sink);
    }


            

Reported by PMD.

android/guava-testlib/src/com/google/common/collect/testing/testers/QueueRemoveTester.java
6 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: 41

              @GwtCompatible
@Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
public class QueueRemoveTester<E> extends AbstractQueueTester<E> {
  @CollectionFeature.Require(SUPPORTS_REMOVE)
  @CollectionSize.Require(ZERO)
  public void testRemove_empty() {
    try {
      getQueue().remove();
      fail("emptyQueue.remove() should throw");

            

Reported by PMD.

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

Line: 45

                @CollectionSize.Require(ZERO)
  public void testRemove_empty() {
    try {
      getQueue().remove();
      fail("emptyQueue.remove() should throw");
    } catch (NoSuchElementException expected) {
    }
    expectUnchanged();
  }

            

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: 52

                  expectUnchanged();
  }

  @CollectionFeature.Require(SUPPORTS_REMOVE)
  @CollectionSize.Require(ONE)
  public void testRemove_size1() {
    assertEquals("size1Queue.remove() should return first element", e0(), getQueue().remove());
    expectMissing(e0());
  }

            

Reported by PMD.

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

Line: 55

                @CollectionFeature.Require(SUPPORTS_REMOVE)
  @CollectionSize.Require(ONE)
  public void testRemove_size1() {
    assertEquals("size1Queue.remove() should return first element", e0(), getQueue().remove());
    expectMissing(e0());
  }

  @CollectionFeature.Require({KNOWN_ORDER, SUPPORTS_REMOVE})
  @CollectionSize.Require(SEVERAL)

            

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: 59

                  expectMissing(e0());
  }

  @CollectionFeature.Require({KNOWN_ORDER, SUPPORTS_REMOVE})
  @CollectionSize.Require(SEVERAL)
  public void testRemove_sizeMany() {
    assertEquals("sizeManyQueue.remove() should return first element", e0(), getQueue().remove());
    expectMissing(e0());
  }

            

Reported by PMD.

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

Line: 62

                @CollectionFeature.Require({KNOWN_ORDER, SUPPORTS_REMOVE})
  @CollectionSize.Require(SEVERAL)
  public void testRemove_sizeMany() {
    assertEquals("sizeManyQueue.remove() should return first element", e0(), getQueue().remove());
    expectMissing(e0());
  }
}

            

Reported by PMD.

android/guava-testlib/src/com/google/common/collect/testing/google/ListMultimapPutAllTester.java
6 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 ListMultimapPutAllTester<K, V> extends AbstractListMultimapTester<K, V> {
  @MapFeature.Require(SUPPORTS_PUT)
  public void testPutAllAddsAtEndInOrder() {
    @SuppressWarnings("unchecked")
    List<V> values = Arrays.asList(v3(), v1(), v4());

    for (K k : sampleKeys()) {

            

Reported by PMD.

Unit tests should not contain more than 1 assert(s).
Design

Line: 36

              @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
public class ListMultimapPutAllTester<K, V> extends AbstractListMultimapTester<K, V> {
  @MapFeature.Require(SUPPORTS_PUT)
  public void testPutAllAddsAtEndInOrder() {
    @SuppressWarnings("unchecked")
    List<V> values = Arrays.asList(v3(), v1(), v4());

    for (K k : sampleKeys()) {
      resetContainer();

            

Reported by PMD.

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

Line: 43

                  for (K k : sampleKeys()) {
      resetContainer();

      List<V> expectedValues = copyToList(multimap().get(k));

      assertTrue(multimap().putAll(k, values));
      expectedValues.addAll(values);

      assertGet(k, expectedValues);

            

Reported by PMD.

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

Line: 45

              
      List<V> expectedValues = copyToList(multimap().get(k));

      assertTrue(multimap().putAll(k, values));
      expectedValues.addAll(values);

      assertGet(k, expectedValues);
    }
  }

            

Reported by PMD.

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

Line: 46

                    List<V> expectedValues = copyToList(multimap().get(k));

      assertTrue(multimap().putAll(k, values));
      expectedValues.addAll(values);

      assertGet(k, expectedValues);
    }
  }
}

            

Reported by PMD.

Found 'DU'-anomaly for variable 'values' (lines '38'-'50').
Error

Line: 38

                @MapFeature.Require(SUPPORTS_PUT)
  public void testPutAllAddsAtEndInOrder() {
    @SuppressWarnings("unchecked")
    List<V> values = Arrays.asList(v3(), v1(), v4());

    for (K k : sampleKeys()) {
      resetContainer();

      List<V> expectedValues = copyToList(multimap().get(k));

            

Reported by PMD.

android/guava-testlib/src/com/google/common/collect/testing/testers/SetAddAllTester.java
6 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: 38

              @GwtCompatible
@Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
public class SetAddAllTester<E> extends AbstractSetTester<E> {
  @CollectionFeature.Require(SUPPORTS_ADD)
  @CollectionSize.Require(absent = ZERO)
  public void testAddAll_supportedSomePresent() {
    assertTrue(
        "add(somePresent) should return true", getSet().addAll(MinimalCollection.of(e3(), e0())));
    expectAdded(e3());

            

Reported by PMD.

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

Line: 42

                @CollectionSize.Require(absent = ZERO)
  public void testAddAll_supportedSomePresent() {
    assertTrue(
        "add(somePresent) should return true", getSet().addAll(MinimalCollection.of(e3(), e0())));
    expectAdded(e3());
  }

  @CollectionFeature.Require(SUPPORTS_ADD)
  public void testAddAll_withDuplicates() {

            

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

                  expectAdded(e3());
  }

  @CollectionFeature.Require(SUPPORTS_ADD)
  public void testAddAll_withDuplicates() {
    MinimalCollection<E> elementsToAdd = MinimalCollection.of(e3(), e4(), e3(), e4());
    assertTrue("add(hasDuplicates) should return true", getSet().addAll(elementsToAdd));
    expectAdded(e3(), e4());
  }

            

Reported by PMD.

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

Line: 49

                @CollectionFeature.Require(SUPPORTS_ADD)
  public void testAddAll_withDuplicates() {
    MinimalCollection<E> elementsToAdd = MinimalCollection.of(e3(), e4(), e3(), e4());
    assertTrue("add(hasDuplicates) should return true", getSet().addAll(elementsToAdd));
    expectAdded(e3(), e4());
  }

  @CollectionFeature.Require(SUPPORTS_ADD)
  @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: 53

                  expectAdded(e3(), e4());
  }

  @CollectionFeature.Require(SUPPORTS_ADD)
  @CollectionSize.Require(absent = ZERO)
  public void testAddAll_supportedAllPresent() {
    assertFalse("add(allPresent) should return false", getSet().addAll(MinimalCollection.of(e0())));
    expectUnchanged();
  }

            

Reported by PMD.

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

Line: 56

                @CollectionFeature.Require(SUPPORTS_ADD)
  @CollectionSize.Require(absent = ZERO)
  public void testAddAll_supportedAllPresent() {
    assertFalse("add(allPresent) should return false", getSet().addAll(MinimalCollection.of(e0())));
    expectUnchanged();
  }
}

            

Reported by PMD.

android/guava-tests/test/com/google/common/cache/LongAdderTest.java
6 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

                 * version, which checks package-private methods that we don't want to have to annotate as {@code
   * Nullable} because we don't want diffs from jsr166e.
   */
  public void testNulls() {}

  public void testOverflows() {
    LongAdder longAdder = new LongAdder();
    longAdder.add(Long.MAX_VALUE);
    assertThat(longAdder.sum()).isEqualTo(Long.MAX_VALUE);

            

Reported by PMD.

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

Line: 29

                 * version, which checks package-private methods that we don't want to have to annotate as {@code
   * Nullable} because we don't want diffs from jsr166e.
   */
  public void testNulls() {}

  public void testOverflows() {
    LongAdder longAdder = new LongAdder();
    longAdder.add(Long.MAX_VALUE);
    assertThat(longAdder.sum()).isEqualTo(Long.MAX_VALUE);

            

Reported by PMD.

Unit tests should not contain more than 1 assert(s).
Design

Line: 31

                 */
  public void testNulls() {}

  public void testOverflows() {
    LongAdder longAdder = new LongAdder();
    longAdder.add(Long.MAX_VALUE);
    assertThat(longAdder.sum()).isEqualTo(Long.MAX_VALUE);
    longAdder.add(1);
    // silently overflows; is this a bug?

            

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: 31

                 */
  public void testNulls() {}

  public void testOverflows() {
    LongAdder longAdder = new LongAdder();
    longAdder.add(Long.MAX_VALUE);
    assertThat(longAdder.sum()).isEqualTo(Long.MAX_VALUE);
    longAdder.add(1);
    // silently overflows; is this a bug?

            

Reported by PMD.

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

Line: 34

                public void testOverflows() {
    LongAdder longAdder = new LongAdder();
    longAdder.add(Long.MAX_VALUE);
    assertThat(longAdder.sum()).isEqualTo(Long.MAX_VALUE);
    longAdder.add(1);
    // silently overflows; is this a bug?
    // See https://github.com/google/guava/issues/3503
    assertThat(longAdder.sum()).isEqualTo(-9223372036854775808L);
  }

            

Reported by PMD.

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

Line: 38

                  longAdder.add(1);
    // silently overflows; is this a bug?
    // See https://github.com/google/guava/issues/3503
    assertThat(longAdder.sum()).isEqualTo(-9223372036854775808L);
  }
}

            

Reported by PMD.

android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionCreationTester.java
6 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: 41

              @GwtCompatible(emulated = true)
@Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
public class CollectionCreationTester<E> extends AbstractCollectionTester<E> {
  @CollectionFeature.Require(ALLOWS_NULL_VALUES)
  @CollectionSize.Require(absent = ZERO)
  public void testCreateWithNull_supported() {
    E[] array = createArrayWithNullElement();
    collection = getSubjectGenerator().create(array);
    expectContents(array);

            

Reported by PMD.

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

Line: 45

                @CollectionSize.Require(absent = ZERO)
  public void testCreateWithNull_supported() {
    E[] array = createArrayWithNullElement();
    collection = getSubjectGenerator().create(array);
    expectContents(array);
  }

  @CollectionFeature.Require(absent = ALLOWS_NULL_VALUES)
  @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: 49

                  expectContents(array);
  }

  @CollectionFeature.Require(absent = ALLOWS_NULL_VALUES)
  @CollectionSize.Require(absent = ZERO)
  public void testCreateWithNull_unsupported() {
    E[] array = createArrayWithNullElement();

    try {

            

Reported by PMD.

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

Line: 55

                  E[] array = createArrayWithNullElement();

    try {
      getSubjectGenerator().create(array);
      fail("Creating a collection containing null should fail");
    } catch (NullPointerException expected) {
    }
  }


            

Reported by PMD.

Avoid catching NullPointerException; consider removing the cause of the NPE.
Error

Line: 57

                  try {
      getSubjectGenerator().create(array);
      fail("Creating a collection containing null should fail");
    } catch (NullPointerException expected) {
    }
  }

  /**
   * Returns the {@link Method} instance for {@link #testCreateWithNull_unsupported()} so that tests

            

Reported by PMD.

Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block
Design

Line: 57

                  try {
      getSubjectGenerator().create(array);
      fail("Creating a collection containing null should fail");
    } catch (NullPointerException expected) {
    }
  }

  /**
   * Returns the {@link Method} instance for {@link #testCreateWithNull_unsupported()} so that tests

            

Reported by PMD.