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

Method addCookie

java/org/apache/catalina/connector/Request.java:1720–1739  ·  view source on GitHub ↗

Add a Cookie to the set of Cookies associated with this Request. @param cookie The new cookie

(Cookie cookie)

Source from the content-addressed store, hash-verified

1718 * @param cookie The new cookie
1719 */
1720 public void addCookie(Cookie cookie) {
1721
1722 if (!cookiesConverted) {
1723 convertCookies();
1724 }
1725
1726 int size = 0;
1727 if (cookies != null) {
1728 size = cookies.length;
1729 }
1730
1731 Cookie[] newCookies = new Cookie[size + 1];
1732 if (cookies != null) {
1733 System.arraycopy(cookies, 0, newCookies, 0, size);
1734 }
1735 newCookies[size] = cookie;
1736
1737 cookies = newCookies;
1738
1739 }
1740
1741
1742 /**

Callers

nothing calls this directly

Calls 1

convertCookiesMethod · 0.95

Tested by

no test coverage detected