MicrometerRules
SUGGESTION
Simplification
Suppression
Disable all rules by adding
-XepOpt:Refaster:NamePattern=^(?!MicrometerRules\$).*
as compiler argument.
TagsOf1
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("TagsOf1")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!MicrometerRules\$TagsOf1).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<Iterable<Tag>> testTagsOf1() {
- return ImmutableSet.of(
- ImmutableSet.of(Tag.of("foo", "v1")), ImmutableList.of(Tag.of("bar", "v2")));
+ return ImmutableSet.of(Tags.of(Tag.of("foo", "v1")), Tags.of(Tag.of("bar", "v2")));
}
TagsOf2
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("TagsOf2")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!MicrometerRules\$TagsOf2).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<Iterable<Tag>> testTagsOf2() {
return ImmutableSet.of(
- ImmutableSet.of(Tag.of("foo", "v1"), Tag.of("bar", "v2")),
- ImmutableList.of(Tag.of("baz", "v3"), Tag.of("qux", "v4")));
+ Tags.of(Tag.of("foo", "v1"), Tag.of("bar", "v2")),
+ Tags.of(Tag.of("baz", "v3"), Tag.of("qux", "v4")));
}
TagsOf3
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("TagsOf3")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!MicrometerRules\$TagsOf3).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<Iterable<Tag>> testTagsOf3() {
return ImmutableSet.of(
- 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")));
+ 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")));
}
TagsOf4
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("TagsOf4")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!MicrometerRules\$TagsOf4).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<Iterable<Tag>> testTagsOf4() {
return ImmutableSet.of(
- ImmutableSet.of(
- Tag.of("foo", "v1"), Tag.of("bar", "v2"), Tag.of("baz", "v3"), Tag.of("qux", "v4")),
- ImmutableList.of(
+ Tags.of(Tag.of("foo", "v1"), Tag.of("bar", "v2"), Tag.of("baz", "v3"), Tag.of("qux", "v4")),
+ Tags.of(
Tag.of("quux", "v5"),
Tag.of("corge", "v6"),
Tag.of("grault", "v7"),
Tag.of("garply", "v8")));
}
TagsOf5
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("TagsOf5")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!MicrometerRules\$TagsOf5).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<Iterable<Tag>> testTagsOf5() {
return ImmutableSet.of(
- ImmutableSet.of(
+ Tags.of(
Tag.of("foo", "v1"),
Tag.of("bar", "v2"),
Tag.of("baz", "v3"),
Tag.of("qux", "v4"),
Tag.of("quux", "v5")),
- ImmutableList.of(
+ Tags.of(
Tag.of("corge", "v6"),
Tag.of("grault", "v7"),
Tag.of("garply", "v8"),
Tag.of("waldo", "v9"),
Tag.of("fred", "v10")));
}