From 39c200cc2136e266c210eb165dd6d20d04a19ff2 Mon Sep 17 00:00:00 2001 From: Carter Kozak Date: Wed, 25 Sep 2019 11:17:58 -0400 Subject: [PATCH] updates from develop --- .../refaster/AssertjCollectionIsEmpty.java | 2 +- ...sertjCollectionIsEmptyWithDescription.java | 30 +------------------ 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/baseline-refaster-rules/src/main/java/com/palantir/baseline/refaster/AssertjCollectionIsEmpty.java b/baseline-refaster-rules/src/main/java/com/palantir/baseline/refaster/AssertjCollectionIsEmpty.java index 1bb15a7b05..833f6ac388 100644 --- a/baseline-refaster-rules/src/main/java/com/palantir/baseline/refaster/AssertjCollectionIsEmpty.java +++ b/baseline-refaster-rules/src/main/java/com/palantir/baseline/refaster/AssertjCollectionIsEmpty.java @@ -42,7 +42,7 @@ void bad3(Collection things) { } @BeforeTemplate - void bad9(Collection things) { + void bad4(Collection things) { assertThat(things.size()).isEqualTo(0); } diff --git a/baseline-refaster-rules/src/main/java/com/palantir/baseline/refaster/AssertjCollectionIsEmptyWithDescription.java b/baseline-refaster-rules/src/main/java/com/palantir/baseline/refaster/AssertjCollectionIsEmptyWithDescription.java index 5fbc1ea35a..ee8f0b740e 100644 --- a/baseline-refaster-rules/src/main/java/com/palantir/baseline/refaster/AssertjCollectionIsEmptyWithDescription.java +++ b/baseline-refaster-rules/src/main/java/com/palantir/baseline/refaster/AssertjCollectionIsEmptyWithDescription.java @@ -18,14 +18,11 @@ import static org.assertj.core.api.Assertions.assertThat; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; import com.google.errorprone.refaster.ImportPolicy; import com.google.errorprone.refaster.annotation.AfterTemplate; import com.google.errorprone.refaster.annotation.BeforeTemplate; import com.google.errorprone.refaster.annotation.UseImportPolicy; import java.util.Collection; -import java.util.Collections; public final class AssertjCollectionIsEmptyWithDescription { @@ -45,32 +42,7 @@ void bad3(Collection things, String description) { } @BeforeTemplate - void bad4(Iterable things, String description) { - assertThat(things).describedAs(description).isEqualTo(Collections.emptyList()); - } - - @BeforeTemplate - void bad5(Iterable things, String description) { - assertThat(things).describedAs(description).isEqualTo(Collections.emptySet()); - } - - @BeforeTemplate - void bad6(Iterable things, String description) { - assertThat(things).describedAs(description).isEqualTo(ImmutableList.of()); - } - - @BeforeTemplate - void bad7(Iterable things, String description) { - assertThat(things).describedAs(description).isEqualTo(ImmutableSet.of()); - } - - @BeforeTemplate - void bad8(Iterable things, String description) { - assertThat(things).describedAs(description).hasSize(0); - } - - @BeforeTemplate - void bad9(Collection things, String description) { + void bad4(Collection things, String description) { assertThat(things.size()).describedAs(description).isEqualTo(0); }