Polish ternary expressions

This commit is contained in:
Phillip Webb
2018-07-29 09:16:06 +01:00
parent b24bb688b8
commit aeb885192e
49 changed files with 59 additions and 60 deletions

View File

@@ -991,7 +991,7 @@ public class JsonContentAssert extends AbstractAssert<JsonContentAssert, CharSeq
}
try {
return JSONCompare.compareJSON(
((expectedJson != null) ? expectedJson.toString() : null),
(expectedJson != null) ? expectedJson.toString() : null,
this.actual.toString(), compareMode);
}
catch (Exception ex) {
@@ -1009,7 +1009,7 @@ public class JsonContentAssert extends AbstractAssert<JsonContentAssert, CharSeq
}
try {
return JSONCompare.compareJSON(
((expectedJson != null) ? expectedJson.toString() : null),
(expectedJson != null) ? expectedJson.toString() : null,
this.actual.toString(), comparator);
}
catch (Exception ex) {
@@ -1054,7 +1054,7 @@ public class JsonContentAssert extends AbstractAssert<JsonContentAssert, CharSeq
JsonPathValue(CharSequence expression, Object... args) {
org.springframework.util.Assert.hasText(
((expression != null) ? expression.toString() : null),
(expression != null) ? expression.toString() : null,
"expression must not be null or empty");
this.expression = String.format(expression.toString(), args);
this.jsonPath = JsonPath.compile(this.expression);