1
0
mirror of synced 2026-05-22 13:23:17 +00:00

Use consistent ternary expression style

Update all ternary expressions so that the condition is always in
parentheses and "not equals" is used in the test. This helps to bring
consistency across the codebase which makes ternary expression easier
to scan.

For example: `a = (a != null) ? a : b`

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-07-30 00:31:13 -07:00
committed by Rob Winch
parent 8d3f039f76
commit 834dcf5bcf
131 changed files with 277 additions and 265 deletions
@@ -81,7 +81,9 @@ public interface PayloadExchangeMatcher {
* @return
*/
public static Mono<MatchResult> match(Map<String, ? extends Object> variables) {
return Mono.just(new MatchResult(true, variables == null ? null : new HashMap<String, Object>(variables)));
MatchResult result = new MatchResult(true,
(variables != null) ? new HashMap<String, Object>(variables) : null);
return Mono.just(result);
}
/**