Compare commits

...

4 Commits

Author SHA1 Message Date
mohamedsamehsalah
0e90279fd5 Post rebase fixes 2024-05-24 13:29:31 +02:00
mohamedsamehsalah
fc0eda1ae6 Address comments: Add test cases and cover more argument types 2024-05-24 13:29:31 +02:00
mohamedsamehsalah
eed508eb98 Apply the suggestions....manually ? 2024-05-24 13:29:31 +02:00
mohamedsamehsalah
91a748e3cb Sort entries of RefasterRuleCollectionTestCase#elidedTypesAndStaticImports 2024-05-24 13:29:31 +02:00
34 changed files with 205 additions and 54 deletions

View File

@@ -17,9 +17,9 @@ final class AssertJThrowingCallableRulesTest implements RefasterRuleCollectionTe
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
assertThatExceptionOfType(Throwable.class),
assertThatIOException(),
assertThatIllegalArgumentException(),
assertThatIllegalStateException(),
assertThatIOException(),
assertThatNullPointerException());
}

View File

@@ -18,9 +18,9 @@ final class AssertJThrowingCallableRulesTest implements RefasterRuleCollectionTe
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
assertThatExceptionOfType(Throwable.class),
assertThatIOException(),
assertThatIllegalArgumentException(),
assertThatIllegalStateException(),
assertThatIOException(),
assertThatNullPointerException());
}

View File

@@ -25,10 +25,10 @@ final class ComparatorRulesTest implements RefasterRuleCollectionTestCase {
return ImmutableSet.of(
Arrays.class,
Collections.class,
identity(),
ImmutableList.class,
ImmutableSet.class,
Stream.class,
identity());
Stream.class);
}
ImmutableSet<Comparator<String>> testNaturalOrder() {

View File

@@ -26,10 +26,10 @@ final class ComparatorRulesTest implements RefasterRuleCollectionTestCase {
return ImmutableSet.of(
Arrays.class,
Collections.class,
identity(),
ImmutableList.class,
ImmutableSet.class,
Stream.class,
identity());
Stream.class);
}
ImmutableSet<Comparator<String>> testNaturalOrder() {

View File

@@ -14,7 +14,7 @@ import tech.picnic.errorprone.refaster.test.RefasterRuleCollectionTestCase;
final class EqualityRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Objects.class, Optional.class, not(null));
return ImmutableSet.of(not(null), Objects.class, Optional.class);
}
ImmutableSet<Boolean> testPrimitiveOrReferenceEquality() {

View File

@@ -14,7 +14,7 @@ import tech.picnic.errorprone.refaster.test.RefasterRuleCollectionTestCase;
final class EqualityRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Objects.class, Optional.class, not(null));
return ImmutableSet.of(not(null), Objects.class, Optional.class);
}
ImmutableSet<Boolean> testPrimitiveOrReferenceEquality() {

View File

@@ -22,7 +22,7 @@ final class ImmutableListMultimapRulesTest implements RefasterRuleCollectionTest
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Streams.class, flatteningToImmutableListMultimap(null, null), identity());
flatteningToImmutableListMultimap(null, null), identity(), Streams.class);
}
ImmutableSet<ImmutableMultimap.Builder<String, Integer>> testImmutableListMultimapBuilder() {

View File

@@ -22,7 +22,7 @@ final class ImmutableListMultimapRulesTest implements RefasterRuleCollectionTest
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Streams.class, flatteningToImmutableListMultimap(null, null), identity());
flatteningToImmutableListMultimap(null, null), identity(), Streams.class);
}
ImmutableSet<ImmutableMultimap.Builder<String, Integer>> testImmutableListMultimapBuilder() {

View File

@@ -17,7 +17,7 @@ final class ImmutableListRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Arrays.class, Collections.class, Comparator.class, Streams.class, naturalOrder());
Arrays.class, Collections.class, Comparator.class, naturalOrder(), Streams.class);
}
ImmutableList.Builder<String> testImmutableListBuilder() {

View File

@@ -18,7 +18,7 @@ final class ImmutableListRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Arrays.class, Collections.class, Comparator.class, Streams.class, naturalOrder());
Arrays.class, Collections.class, Comparator.class, naturalOrder(), Streams.class);
}
ImmutableList.Builder<String> testImmutableListBuilder() {

View File

@@ -17,7 +17,7 @@ import tech.picnic.errorprone.refaster.test.RefasterRuleCollectionTestCase;
final class ImmutableMapRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Collections.class, Streams.class, identity());
return ImmutableSet.of(Collections.class, identity(), Streams.class);
}
ImmutableMap.Builder<String, Integer> testImmutableMapBuilder() {

View File

@@ -17,7 +17,7 @@ import tech.picnic.errorprone.refaster.test.RefasterRuleCollectionTestCase;
final class ImmutableMapRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Collections.class, Streams.class, identity());
return ImmutableSet.of(Collections.class, identity(), Streams.class);
}
ImmutableMap.Builder<String, Integer> testImmutableMapBuilder() {

View File

@@ -18,7 +18,7 @@ import tech.picnic.errorprone.refaster.test.RefasterRuleCollectionTestCase;
final class ImmutableSetMultimapRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Streams.class, flatteningToImmutableSetMultimap(null, null));
return ImmutableSet.of(flatteningToImmutableSetMultimap(null, null), Streams.class);
}
ImmutableSetMultimap.Builder<String, Integer> testImmutableSetMultimapBuilder() {

View File

@@ -18,7 +18,7 @@ import tech.picnic.errorprone.refaster.test.RefasterRuleCollectionTestCase;
final class ImmutableSetMultimapRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Streams.class, flatteningToImmutableSetMultimap(null, null));
return ImmutableSet.of(flatteningToImmutableSetMultimap(null, null), Streams.class);
}
ImmutableSetMultimap.Builder<String, Integer> testImmutableSetMultimapBuilder() {

View File

@@ -18,7 +18,7 @@ import tech.picnic.errorprone.refaster.test.RefasterRuleCollectionTestCase;
final class ImmutableSetRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Arrays.class, Collections.class, Streams.class, not(null));
return ImmutableSet.of(Arrays.class, Collections.class, not(null), Streams.class);
}
ImmutableSet.Builder<String> testImmutableSetBuilder() {

View File

@@ -18,7 +18,7 @@ import tech.picnic.errorprone.refaster.test.RefasterRuleCollectionTestCase;
final class ImmutableSetRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Arrays.class, Collections.class, Streams.class, not(null));
return ImmutableSet.of(Arrays.class, Collections.class, not(null), Streams.class);
}
ImmutableSet.Builder<String> testImmutableSetBuilder() {

View File

@@ -16,7 +16,7 @@ final class ImmutableSortedMapRulesTest implements RefasterRuleCollectionTestCas
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Stream.class, Streams.class, naturalOrder(), toImmutableSortedMap(null, null, null));
naturalOrder(), Stream.class, Streams.class, toImmutableSortedMap(null, null, null));
}
ImmutableSortedMap.Builder<String, Integer> testImmutableSortedMapBuilder() {

View File

@@ -16,7 +16,7 @@ final class ImmutableSortedMapRulesTest implements RefasterRuleCollectionTestCas
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Stream.class, Streams.class, naturalOrder(), toImmutableSortedMap(null, null, null));
naturalOrder(), Stream.class, Streams.class, toImmutableSortedMap(null, null, null));
}
ImmutableSortedMap.Builder<String, Integer> testImmutableSortedMapBuilder() {

View File

@@ -19,17 +19,17 @@ final class JUnitToAssertJRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Assertions.class,
assertDoesNotThrow(() -> null),
assertInstanceOf(null, null),
assertThrows(null, null),
assertThrowsExactly(null, null),
(Runnable) () -> assertFalse(true),
(Runnable) () -> assertNotNull(null),
(Runnable) () -> assertNotSame(null, null),
(Runnable) () -> assertNull(null),
(Runnable) () -> assertSame(null, null),
(Runnable) () -> assertTrue(true));
(Runnable) () -> assertTrue(true),
assertDoesNotThrow(() -> null),
assertInstanceOf(null, null),
Assertions.class,
assertThrows(null, null),
assertThrowsExactly(null, null));
}
void testThrowNewAssertionError() {

View File

@@ -22,17 +22,17 @@ final class JUnitToAssertJRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Assertions.class,
assertDoesNotThrow(() -> null),
assertInstanceOf(null, null),
assertThrows(null, null),
assertThrowsExactly(null, null),
(Runnable) () -> assertFalse(true),
(Runnable) () -> assertNotNull(null),
(Runnable) () -> assertNotSame(null, null),
(Runnable) () -> assertNull(null),
(Runnable) () -> assertSame(null, null),
(Runnable) () -> assertTrue(true));
(Runnable) () -> assertTrue(true),
assertDoesNotThrow(() -> null),
assertInstanceOf(null, null),
Assertions.class,
assertThrows(null, null),
assertThrowsExactly(null, null));
}
void testThrowNewAssertionError() {

View File

@@ -36,12 +36,12 @@ final class ReactorRulesTest implements RefasterRuleCollectionTestCase {
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
ArrayList.class,
assertThat(0),
Collection.class,
HashMap.class,
List.class,
ImmutableCollection.class,
ImmutableMap.class,
assertThat(0),
List.class,
maxBy(null),
minBy(null),
naturalOrder(),

View File

@@ -39,12 +39,12 @@ final class ReactorRulesTest implements RefasterRuleCollectionTestCase {
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
ArrayList.class,
assertThat(0),
Collection.class,
HashMap.class,
List.class,
ImmutableCollection.class,
ImmutableMap.class,
assertThat(0),
List.class,
maxBy(null),
minBy(null),
naturalOrder(),

View File

@@ -43,22 +43,22 @@ final class StreamRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
ImmutableList.class,
ImmutableMap.class,
List.class,
Map.class,
Objects.class,
Streams.class,
collectingAndThen(null, null),
counting(),
filtering(null, null),
flatMapping(null, null),
identity(),
ImmutableList.class,
ImmutableMap.class,
List.class,
Map.class,
mapping(null, null),
maxBy(null),
minBy(null),
not(null),
Objects.class,
reducing(null),
Streams.class,
summarizingDouble(null),
summarizingInt(null),
summarizingLong(null),

View File

@@ -45,22 +45,22 @@ final class StreamRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
ImmutableList.class,
ImmutableMap.class,
List.class,
Map.class,
Objects.class,
Streams.class,
collectingAndThen(null, null),
counting(),
filtering(null, null),
flatMapping(null, null),
identity(),
ImmutableList.class,
ImmutableMap.class,
List.class,
Map.class,
mapping(null, null),
maxBy(null),
minBy(null),
not(null),
Objects.class,
reducing(null),
Streams.class,
summarizingDouble(null),
summarizingInt(null),
summarizingLong(null),

View File

@@ -20,7 +20,7 @@ final class StringRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Arrays.class, Joiner.class, Objects.class, Stream.class, Streams.class, joining(), UTF_8);
UTF_8, Arrays.class, Joiner.class, joining(), Objects.class, Stream.class, Streams.class);
}
ImmutableSet<Boolean> testStringIsEmpty() {

View File

@@ -23,7 +23,7 @@ final class StringRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Arrays.class, Joiner.class, Objects.class, Stream.class, Streams.class, joining(), UTF_8);
UTF_8, Arrays.class, Joiner.class, joining(), Objects.class, Stream.class, Streams.class);
}
ImmutableSet<Boolean> testStringIsEmpty() {

View File

@@ -16,7 +16,7 @@ import tech.picnic.errorprone.refaster.test.RefasterRuleCollectionTestCase;
final class WebClientRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(fromValue(""), GET, HEAD, OPTIONS, PATCH, POST, PUT);
return ImmutableSet.of(GET, HEAD, OPTIONS, PATCH, POST, PUT, fromValue(""));
}
ImmutableSet<?> testBodyValue() {

View File

@@ -16,7 +16,7 @@ import tech.picnic.errorprone.refaster.test.RefasterRuleCollectionTestCase;
final class WebClientRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(fromValue(""), GET, HEAD, OPTIONS, PATCH, POST, PUT);
return ImmutableSet.of(GET, HEAD, OPTIONS, PATCH, POST, PUT, fromValue(""));
}
ImmutableSet<?> testBodyValue() {

View File

@@ -62,6 +62,11 @@
</dependency>
<!-- XXX: Explicitly declared as a workaround for
https://github.com/pitest/pitest-junit5-plugin/issues/105. -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>

View File

@@ -1,14 +1,18 @@
package tech.picnic.errorprone.refaster.test;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.common.collect.ImmutableListMultimap.toImmutableListMultimap;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet;
import static com.google.errorprone.BugPattern.LinkType.NONE;
import static com.google.errorprone.BugPattern.SeverityLevel.ERROR;
import static java.util.Comparator.comparing;
import static java.util.Comparator.naturalOrder;
import static java.util.stream.Collectors.joining;
import static tech.picnic.errorprone.refaster.runner.Refaster.INCLUDED_RULES_PATTERN_FLAG;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableListMultimap;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableRangeMap;
@@ -31,9 +35,15 @@ import com.google.errorprone.matchers.Description;
import com.google.errorprone.util.ASTHelpers;
import com.sun.source.tree.ClassTree;
import com.sun.source.tree.CompilationUnitTree;
import com.sun.source.tree.ExpressionTree;
import com.sun.source.tree.LineMap;
import com.sun.source.tree.LiteralTree;
import com.sun.source.tree.MemberSelectTree;
import com.sun.source.tree.MethodInvocationTree;
import com.sun.source.tree.MethodTree;
import com.sun.source.tree.ReturnTree;
import com.sun.source.tree.Tree;
import com.sun.source.tree.Tree.Kind;
import com.sun.source.util.TreeScanner;
import com.sun.tools.javac.tree.EndPosTable;
import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
@@ -67,6 +77,8 @@ public final class RefasterRuleCollection extends BugChecker implements Compilat
private static final long serialVersionUID = 1L;
private static final String RULE_COLLECTION_FLAG = "RefasterRuleCollection:RuleCollection";
private static final String TEST_METHOD_NAME_PREFIX = "test";
private static final String ELIDED_TYPES_AND_STATIC_IMPORTS_METHOD_NAME =
"elidedTypesAndStaticImports";
private final String ruleCollectionUnderTest;
private final ImmutableSortedSet<String> rulesUnderTest;
@@ -133,7 +145,10 @@ public final class RefasterRuleCollection extends BugChecker implements Compilat
@Override
public Description matchCompilationUnit(CompilationUnitTree tree, VisitorState state) {
SuggestedFix.Builder fixBuilder = SuggestedFix.builder();
reportIncorrectClassName(tree, state);
reportUnSortedElidedTypesAndStaticImports(tree, fixBuilder, state);
List<Description> matches = new ArrayList<>();
delegate.matchCompilationUnit(
@@ -148,7 +163,7 @@ public final class RefasterRuleCollection extends BugChecker implements Compilat
reportMissingMatches(tree, indexedMatches, state);
reportUnexpectedMatches(tree, indexedMatches, state);
return Description.NO_MATCH;
return fixBuilder.isEmpty() ? Description.NO_MATCH : describeMatch(tree, fixBuilder.build());
}
private void reportIncorrectClassName(CompilationUnitTree tree, VisitorState state) {
@@ -175,6 +190,67 @@ public final class RefasterRuleCollection extends BugChecker implements Compilat
}
}
private void reportUnSortedElidedTypesAndStaticImports(
CompilationUnitTree compilationUnit, SuggestedFix.Builder fixBuilder, VisitorState state) {
new TreeScanner<@Nullable Void, @Nullable Void>() {
@Override
public @Nullable Void visitMethod(MethodTree tree, @Nullable Void unused) {
String methodName = tree.getName().toString();
if (ELIDED_TYPES_AND_STATIC_IMPORTS_METHOD_NAME.equals(methodName)) {
Optional<ReturnTree> returnTree =
tree.getBody().getStatements().stream()
.filter(statement -> statement.getKind() == Kind.RETURN)
.findFirst()
.map(ReturnTree.class::cast);
returnTree
.map(ReturnTree::getExpression)
.map(MethodInvocationTree.class::cast)
.ifPresent(
methodInvocationTree -> {
List<? extends ExpressionTree> actualArgumentsOrdering =
methodInvocationTree.getArguments();
ImmutableList<? extends ExpressionTree> desiredArgumentOrdering =
actualArgumentsOrdering.stream()
.sorted(
comparing(
arg -> getArgumentName(arg, state),
String.CASE_INSENSITIVE_ORDER))
.collect(toImmutableList());
if (!actualArgumentsOrdering.equals(desiredArgumentOrdering)) {
String suggestion =
desiredArgumentOrdering.stream()
.map(state::getSourceForNode)
.collect(
joining(
", ",
String.format(
"%s(",
state.getSourceForNode(
methodInvocationTree.getMethodSelect())),
")"));
fixBuilder.merge(SuggestedFix.replace(methodInvocationTree, suggestion));
}
});
}
return super.visitMethod(tree, null);
}
}.scan(compilationUnit, null);
}
private static String getArgumentName(ExpressionTree arg, VisitorState state) {
return switch (arg.getKind()) {
case MEMBER_SELECT -> state.getSourceForNode(((MemberSelectTree) arg).getExpression());
case METHOD_INVOCATION ->
state.getSourceForNode(((MethodInvocationTree) arg).getMethodSelect());
case STRING_LITERAL, INT_LITERAL -> ((LiteralTree) arg).getValue().toString();
default -> "";
};
}
private static ImmutableRangeMap<Integer, String> indexRuleMatches(
List<Description> matches, EndPosTable endPositions) {
ImmutableRangeMap.Builder<Integer, String> ruleMatches = ImmutableRangeMap.builder();
@@ -296,7 +372,7 @@ public final class RefasterRuleCollection extends BugChecker implements Compilat
* Unless this method is `RefasterRuleCollectionTestCase#elidedTypesAndStaticImports`, it's
* misnamed.
*/
if (!"elidedTypesAndStaticImports".equals(methodName)) {
if (!ELIDED_TYPES_AND_STATIC_IMPORTS_METHOD_NAME.equals(methodName)) {
state.reportMatch(
describeMatch(
tree,

View File

@@ -0,0 +1,22 @@
package tech.picnic.errorprone.refaster.test;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
/**
* Refaster rule collection to validate reporting of unsorted arguments of {@link
* RefasterRuleCollectionTestCase#elidedTypesAndStaticImports} in test classes.
*/
final class NonSortedElidedTypesAndStaticImportsTestRules
implements RefasterRuleCollectionTestCase {
private NonSortedElidedTypesAndStaticImportsTestRules() {}
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Lists.class, 3, "k", assertDoesNotThrow(() -> null), Iterables.class, "K", 1);
}
}

View File

@@ -21,6 +21,7 @@ final class RefasterRuleCollectionTest {
MethodWithoutPrefixRules.class,
MisnamedTestClassRules.class,
MissingTestAndWrongTestRules.class,
NonSortedElidedTypesAndStaticImportsTestRules.class,
PartialTestMatchRules.class,
RuleWithoutTestRules.class,
ValidRules.class

View File

@@ -0,0 +1,23 @@
package tech.picnic.errorprone.refaster.test;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
/**
* Refaster rule collection to validate reporting of unsorted arguments of {@link
* RefasterRuleCollectionTestCase#elidedTypesAndStaticImports} in test classes.
*/
final class NonSortedElidedTypesAndStaticImportsTestRulesTest
implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Lists.class, 3, "k", assertDoesNotThrow(() -> null), Iterables.class, "K", 1);
}
}
// This is a comment to appease Checkstyle.
;

View File

@@ -0,0 +1,24 @@
package tech.picnic.errorprone.refaster.test;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
/**
* Refaster rule collection to validate reporting of unsorted arguments of {@link
* RefasterRuleCollectionTestCase#elidedTypesAndStaticImports} in test classes.
*/
final class NonSortedElidedTypesAndStaticImportsTestRulesTest
implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
1, 3, assertDoesNotThrow(() -> null), Iterables.class, "k", "K", Lists.class);
}
}
// This is a comment to appease Checkstyle.
/* ERROR: Unexpected token. */
;