Skip to content

Commit

Permalink
Merge pull request #32157 from jee14
Browse files Browse the repository at this point in the history
* pr/32157:
  Upgrade copyright year of changed file
  Wrap ternary operator within parantheses

Closes gh-32157
  • Loading branch information
snicoll committed Jan 30, 2024
2 parents b55a4d3 + 298f308 commit 3a518b6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -171,7 +171,7 @@ public String toString() {
if (!this.maxAge.isNegative()) {
sb.append("; Max-Age=").append(this.maxAge.getSeconds());
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));
}
if (this.secure) {
Expand Down

0 comments on commit 3a518b6

Please sign in to comment.