Skip to content

Commit

Permalink
Use NewCookie.Builder instead of constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Feb 13, 2023
1 parent 71e316f commit f9565b7
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,18 @@ public Object fromString(String newCookie) throws IllegalArgumentException {
cookieValue = "";
}

return new NewCookie(cookieName, cookieValue, path, domain, version, comment, maxAge, expiry, secure, httpOnly,
sameSite);
return new NewCookie.Builder(cookieName)
.value(cookieValue)
.path(path)
.domain(domain)
.version(version)
.comment(comment)
.maxAge(maxAge)
.expiry(expiry)
.secure(secure)
.httpOnly(httpOnly)
.sameSite(sameSite)
.build();

}

Expand Down

0 comments on commit f9565b7

Please sign in to comment.