Wrap ternary operator within parentheses as outlined in Code Style
Closes gh-25232
This commit is contained in:
parent
663f2e8afd
commit
e866fac8e7
|
@ -583,7 +583,7 @@ class ConcurrentReferenceHashMapTests {
|
|||
}
|
||||
// For testing we want more control of the hash
|
||||
this.supplementalHash = super.getHash(o);
|
||||
return o == null ? 0 : o.hashCode();
|
||||
return (o == null ? 0 : o.hashCode());
|
||||
}
|
||||
|
||||
public int getSupplementalHash() {
|
||||
|
|
|
@ -95,7 +95,7 @@ class HttpComponentsClientHttpResponse implements ClientHttpResponse {
|
|||
private long getMaxAgeSeconds(Cookie cookie) {
|
||||
String maxAgeAttribute = cookie.getAttribute(Cookie.MAX_AGE_ATTR);
|
||||
|
||||
return maxAgeAttribute == null ? -1 : Long.parseLong(maxAgeAttribute);
|
||||
return (maxAgeAttribute == null ? -1 : Long.parseLong(maxAgeAttribute));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -139,7 +139,7 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler {
|
|||
return preface + "[no body]";
|
||||
}
|
||||
|
||||
charset = charset == null ? StandardCharsets.UTF_8 : charset;
|
||||
charset = (charset == null ? StandardCharsets.UTF_8 : charset);
|
||||
int maxChars = 200;
|
||||
|
||||
if (responseBody.length < maxChars * 2) {
|
||||
|
|
|
@ -364,7 +364,7 @@ public class ForwardedHeaderFilter extends OncePerRequestFilter {
|
|||
|
||||
|
||||
public String getContextPath() {
|
||||
return this.forwardedPrefix == null ? this.delegate.get().getContextPath() : this.forwardedPrefix;
|
||||
return (this.forwardedPrefix == null ? this.delegate.get().getContextPath() : this.forwardedPrefix);
|
||||
}
|
||||
|
||||
public String getRequestUri() {
|
||||
|
|
Loading…
Reference in New Issue