MCPcopy Create free account
hub / github.com/apache/tomcat / setLimit

Method setLimit

java/org/apache/tomcat/util/http/ServerCookies.java:98–106  ·  view source on GitHub ↗

Sets the maximum number of cookies that can be stored. @param limit the maximum number of cookies, or -1 for no limit

(int limit)

Source from the content-addressed store, hash-verified

96 * @param limit the maximum number of cookies, or -1 for no limit
97 */
98 public void setLimit(int limit) {
99 this.limit = limit;
100 if (limit > -1 && serverCookies.length > limit && cookieCount <= limit) {
101 // shrink cookie list array
102 ServerCookie[] scookiesTmp = new ServerCookie[limit];
103 System.arraycopy(serverCookies, 0, scookiesTmp, 0, cookieCount);
104 serverCookies = scookiesTmp;
105 }
106 }
107
108
109 /**

Callers 1

parseCookiesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected