SpringTestRules
SUGGESTION
Simplification
Suppression
Disable all rules by adding
-XepOpt:Refaster:NamePattern=^(?!SpringTestRules\$).*as compiler argument.
Table of contents
BodyContentSpecJsonLenient
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("BodyContentSpecJsonLenient")to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!SpringTestRules\$BodyContentSpecJsonLenient).*as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
@SuppressWarnings("deprecation" /* Rule rewrites deprecated method invocation. */)
ImmutableSet<BodyContentSpec> testBodyContentSpecJsonLenient() {
return ImmutableSet.of(
- ((BodyContentSpec) null).json("foo"), ((BodyContentSpec) null).json("bar", false));
+ ((BodyContentSpec) null).json("foo", JsonCompareMode.LENIENT),
+ ((BodyContentSpec) null).json("bar", JsonCompareMode.LENIENT));
}BodyContentSpecJsonStrict
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("BodyContentSpecJsonStrict")to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!SpringTestRules\$BodyContentSpecJsonStrict).*as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
@SuppressWarnings("deprecation" /* Rule rewrites deprecated method invocation. */)
BodyContentSpec testBodyContentSpecJsonStrict() {
- return ((BodyContentSpec) null).json("foo", true);
+ return ((BodyContentSpec) null).json("foo", JsonCompareMode.STRICT);
}