JUnitRules

SUGGESTION

Simplification

View source code on GitHub

Suppression

Disable all rules by adding -XepOpt:Refaster:NamePattern=^(?!JUnitRules\$).* as compiler argument.

Table of contents
  1. ArgumentsEnumeration

ArgumentsEnumeration

SUGGESTION

Simplification

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("ArgumentsEnumeration") to the enclosing element.

Disable this rule by adding -XepOpt:Refaster:NamePattern=^(?!JUnitRules\$ArgumentsEnumeration).* as compiler argument.

Samples

Shows the difference in example code before and after the Refaster rule is applied.

 ImmutableSet<Arguments> testArgumentsEnumeration() {
   return ImmutableSet.of(
-      Arguments.of("foo"), Arguments.of(1, "foo", 2, "bar"), Arguments.of(new Object()));
+      arguments("foo"), arguments(1, "foo", 2, "bar"), arguments(new Object()));
 }

Copyright © 2017-2024 Picnic Technologies BV