1
1
/*
2
- * Copyright 2002-2015 the original author or authors.
2
+ * Copyright 2002-2017 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -55,7 +55,7 @@ public class CookieGenerator {
55
55
56
56
private String cookiePath = DEFAULT_COOKIE_PATH ;
57
57
58
- private Integer cookieMaxAge = null ;
58
+ private Integer cookieMaxAge ;
59
59
60
60
private boolean cookieSecure = false ;
61
61
@@ -111,7 +111,9 @@ public String getCookiePath() {
111
111
112
112
/**
113
113
* Use the given maximum age (in seconds) for cookies created by this generator.
114
- * Useful special value: -1 ... not persistent, deleted when client shuts down
114
+ * Useful special value: -1 ... not persistent, deleted when client shuts down.
115
+ * <p>Default is no specific maximum age at all, using the Servlet container's
116
+ * default.
115
117
* @see javax.servlet.http.Cookie#setMaxAge
116
118
*/
117
119
public void setCookieMaxAge (Integer cookieMaxAge ) {
@@ -128,7 +130,8 @@ public Integer getCookieMaxAge() {
128
130
/**
129
131
* Set whether the cookie should only be sent using a secure protocol,
130
132
* such as HTTPS (SSL). This is an indication to the receiving browser,
131
- * not processed by the HTTP server itself. Default is "false".
133
+ * not processed by the HTTP server itself.
134
+ * <p>Default is "false".
132
135
* @see javax.servlet.http.Cookie#setSecure
133
136
*/
134
137
public void setCookieSecure (boolean cookieSecure ) {
@@ -145,7 +148,7 @@ public boolean isCookieSecure() {
145
148
146
149
/**
147
150
* Set whether the cookie is supposed to be marked with the "HttpOnly" attribute.
148
- * <p>Note that this feature is only available on Servlet 3.0 and higher .
151
+ * <p>Default is "false" .
149
152
* @see javax.servlet.http.Cookie#setHttpOnly
150
153
*/
151
154
public void setCookieHttpOnly (boolean cookieHttpOnly ) {
0 commit comments