Browse Source

Wrap ternary operator within parantheses

See gh-32157
pull/32163/head
jee14 2 years ago committed by Stéphane Nicoll
parent
commit
6ffb74def3
  1. 2
      spring-web/src/main/java/org/springframework/http/ResponseCookie.java

2
spring-web/src/main/java/org/springframework/http/ResponseCookie.java

@ -171,7 +171,7 @@ public final class ResponseCookie extends HttpCookie {
if (!this.maxAge.isNegative()) { if (!this.maxAge.isNegative()) {
sb.append("; Max-Age=").append(this.maxAge.getSeconds()); sb.append("; Max-Age=").append(this.maxAge.getSeconds());
sb.append("; Expires="); sb.append("; Expires=");
long millis = this.maxAge.getSeconds() > 0 ? System.currentTimeMillis() + this.maxAge.toMillis() : 0; long millis = (this.maxAge.getSeconds() > 0 ? System.currentTimeMillis() + this.maxAge.toMillis() : 0);
sb.append(HttpHeaders.formatDate(millis)); sb.append(HttpHeaders.formatDate(millis));
} }
if (this.secure) { if (this.secure) {

Loading…
Cancel
Save