Skip to content

Commit 6ffb74d

Browse files
jee14snicoll
authored andcommitted
Wrap ternary operator within parantheses
See gh-32157
1 parent b55a4d3 commit 6ffb74d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public String toString() {
171171
if (!this.maxAge.isNegative()) {
172172
sb.append("; Max-Age=").append(this.maxAge.getSeconds());
173173
sb.append("; Expires=");
174-
long millis = this.maxAge.getSeconds() > 0 ? System.currentTimeMillis() + this.maxAge.toMillis() : 0;
174+
long millis = (this.maxAge.getSeconds() > 0 ? System.currentTimeMillis() + this.maxAge.toMillis() : 0);
175175
sb.append(HttpHeaders.formatDate(millis));
176176
}
177177
if (this.secure) {

0 commit comments

Comments
 (0)