diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MicrometerRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MicrometerRules.java index e81376a9470..153527adcb9 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MicrometerRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MicrometerRules.java @@ -15,7 +15,7 @@ final class MicrometerRules { private MicrometerRules() {} - /** Prefer {@link Tags} over other immutable {@link Iterable}'s. */ + /** Prefer using {@link Tags} over other immutable collections. */ static final class TagsOf1 { @BeforeTemplate ImmutableCollection before(Tag tag) { @@ -28,7 +28,7 @@ Iterable after(Tag tag) { } } - /** Prefer {@link Tags} over other immutable {@link Iterable}'s. */ + /** Prefer using {@link Tags} over other immutable collections. */ static final class TagsOf2 { @BeforeTemplate ImmutableCollection before(Tag tag1, Tag tag2) { @@ -41,7 +41,7 @@ Iterable after(Tag tag1, Tag tag2) { } } - /** Prefer {@link Tags} over other immutable {@link Iterable}'s. */ + /** Prefer using {@link Tags} over other immutable collections. */ static final class TagsOf3 { @BeforeTemplate ImmutableCollection before(Tag tag1, Tag tag2, Tag tag3) { @@ -54,7 +54,7 @@ Iterable after(Tag tag1, Tag tag2, Tag tag3) { } } - /** Prefer {@link Tags} over other immutable {@link Iterable}'s. */ + /** Prefer using {@link Tags} over other immutable collections. */ static final class TagsOf4 { @BeforeTemplate ImmutableCollection before(Tag tag1, Tag tag2, Tag tag3, Tag tag4) { @@ -68,7 +68,7 @@ Iterable after(Tag tag1, Tag tag2, Tag tag3, Tag tag4) { } } - /** Prefer {@link Tags} over other immutable {@link Iterable}'s. */ + /** Prefer using {@link Tags} over other immutable collections. */ static final class TagsOf5 { @BeforeTemplate ImmutableCollection before(Tag tag1, Tag tag2, Tag tag3, Tag tag4, Tag tag5) { diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/MicrometerRulesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/MicrometerRulesTestInput.java index fff374eb96c..256c9494bbf 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/MicrometerRulesTestInput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/MicrometerRulesTestInput.java @@ -13,48 +13,45 @@ public ImmutableSet elidedTypesAndStaticImports() { ImmutableSet> testTagsOf1() { return ImmutableSet.of( - ImmutableSet.of(Tag.of("foo", "bar")), ImmutableList.of(Tag.of("foo", "bar"))); + ImmutableSet.of(Tag.of("foo", "v1")), ImmutableList.of(Tag.of("bar", "v2"))); } ImmutableSet> testTagsOf2() { return ImmutableSet.of( - ImmutableSet.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1")), - ImmutableList.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1"))); + ImmutableSet.of(Tag.of("foo", "v1"), Tag.of("bar", "v2")), + ImmutableList.of(Tag.of("baz", "v3"), Tag.of("qux", "v4"))); } ImmutableSet> testTagsOf3() { return ImmutableSet.of( - ImmutableSet.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1"), Tag.of("foo2", "bar2")), - ImmutableList.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1"), Tag.of("foo2", "bar2"))); + ImmutableSet.of(Tag.of("foo", "v1"), Tag.of("bar", "v2"), Tag.of("baz", "v3")), + ImmutableList.of(Tag.of("qux", "v4"), Tag.of("quux", "v5"), Tag.of("corge", "v6"))); } ImmutableSet> testTagsOf4() { return ImmutableSet.of( ImmutableSet.of( - Tag.of("foo", "bar"), - Tag.of("foo1", "bar1"), - Tag.of("foo2", "bar2"), - Tag.of("foo3", "bar3")), + Tag.of("foo", "v1"), Tag.of("bar", "v2"), Tag.of("baz", "v3"), Tag.of("qux", "v4")), ImmutableList.of( - Tag.of("foo", "bar"), - Tag.of("foo1", "bar1"), - Tag.of("foo2", "bar2"), - Tag.of("foo3", "bar3"))); + Tag.of("quux", "v5"), + Tag.of("corge", "v6"), + Tag.of("grault", "v7"), + Tag.of("garply", "v8"))); } ImmutableSet> testTagsOf5() { return ImmutableSet.of( ImmutableSet.of( - Tag.of("foo", "bar"), - Tag.of("foo1", "bar1"), - Tag.of("foo2", "bar2"), - Tag.of("foo3", "bar3"), - Tag.of("foo4", "bar4")), + Tag.of("foo", "v1"), + Tag.of("bar", "v2"), + Tag.of("baz", "v3"), + Tag.of("qux", "v4"), + Tag.of("quux", "v5")), ImmutableList.of( - Tag.of("foo", "bar"), - Tag.of("foo1", "bar1"), - Tag.of("foo2", "bar2"), - Tag.of("foo3", "bar3"), - Tag.of("foo4", "bar4"))); + Tag.of("corge", "v6"), + Tag.of("grault", "v7"), + Tag.of("garply", "v8"), + Tag.of("waldo", "v9"), + Tag.of("fred", "v10"))); } } diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/MicrometerRulesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/MicrometerRulesTestOutput.java index 839cf781d84..74c4dd50c89 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/MicrometerRulesTestOutput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/MicrometerRulesTestOutput.java @@ -13,48 +13,44 @@ public ImmutableSet elidedTypesAndStaticImports() { } ImmutableSet> testTagsOf1() { - return ImmutableSet.of(Tags.of(Tag.of("foo", "bar")), Tags.of(Tag.of("foo", "bar"))); + return ImmutableSet.of(Tags.of(Tag.of("foo", "v1")), Tags.of(Tag.of("bar", "v2"))); } ImmutableSet> testTagsOf2() { return ImmutableSet.of( - Tags.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1")), - Tags.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1"))); + Tags.of(Tag.of("foo", "v1"), Tag.of("bar", "v2")), + Tags.of(Tag.of("baz", "v3"), Tag.of("qux", "v4"))); } ImmutableSet> testTagsOf3() { return ImmutableSet.of( - Tags.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1"), Tag.of("foo2", "bar2")), - Tags.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1"), Tag.of("foo2", "bar2"))); + Tags.of(Tag.of("foo", "v1"), Tag.of("bar", "v2"), Tag.of("baz", "v3")), + Tags.of(Tag.of("qux", "v4"), Tag.of("quux", "v5"), Tag.of("corge", "v6"))); } ImmutableSet> testTagsOf4() { return ImmutableSet.of( + Tags.of(Tag.of("foo", "v1"), Tag.of("bar", "v2"), Tag.of("baz", "v3"), Tag.of("qux", "v4")), Tags.of( - Tag.of("foo", "bar"), - Tag.of("foo1", "bar1"), - Tag.of("foo2", "bar2"), - Tag.of("foo3", "bar3")), - Tags.of( - Tag.of("foo", "bar"), - Tag.of("foo1", "bar1"), - Tag.of("foo2", "bar2"), - Tag.of("foo3", "bar3"))); + Tag.of("quux", "v5"), + Tag.of("corge", "v6"), + Tag.of("grault", "v7"), + Tag.of("garply", "v8"))); } ImmutableSet> testTagsOf5() { return ImmutableSet.of( Tags.of( - Tag.of("foo", "bar"), - Tag.of("foo1", "bar1"), - Tag.of("foo2", "bar2"), - Tag.of("foo3", "bar3"), - Tag.of("foo4", "bar4")), + Tag.of("foo", "v1"), + Tag.of("bar", "v2"), + Tag.of("baz", "v3"), + Tag.of("qux", "v4"), + Tag.of("quux", "v5")), Tags.of( - Tag.of("foo", "bar"), - Tag.of("foo1", "bar1"), - Tag.of("foo2", "bar2"), - Tag.of("foo3", "bar3"), - Tag.of("foo4", "bar4"))); + Tag.of("corge", "v6"), + Tag.of("grault", "v7"), + Tag.of("garply", "v8"), + Tag.of("waldo", "v9"), + Tag.of("fred", "v10"))); } }