Apply the suggestions....manually ?

This commit is contained in:
mohamedsamehsalah
2023-10-21 21:16:59 +02:00
committed by Rick Ossendrijver
parent 91a748e3cb
commit eed508eb98
28 changed files with 51 additions and 52 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,21 @@ 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,
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() {