NullPointerTester comes with built-in support for some well known types like
Optional
and ImmutableList
via guava’s
ArbitraryInstances
class. Explicitly calling setDefault
for these types is unnecessary.
Suppress false positives by adding the suppression annotation @SuppressWarnings("UnnecessarySetDefault")
to the enclosing element.