Polish ternary expressions
Consistently format ternary expressions and always favor `!=` as the the check.
This commit is contained in:
@@ -45,8 +45,8 @@ public class SpockTestRestTemplateExample {
|
||||
ObjectProvider<RestTemplateBuilder> builderProvider,
|
||||
Environment environment) {
|
||||
RestTemplateBuilder builder = builderProvider.getIfAvailable();
|
||||
TestRestTemplate template = builder == null ? new TestRestTemplate()
|
||||
: new TestRestTemplate(builder.build());
|
||||
TestRestTemplate template = (builder != null
|
||||
? new TestRestTemplate(builder.build()) : new TestRestTemplate());
|
||||
template.setUriTemplateHandler(new LocalHostUriTemplateHandler(environment));
|
||||
return template;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user