You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2026/05/12 05:52:26 UTC

[Bug 70038] Cookie.clone() is shallow but reference implementation is deep

https://bz.apache.org/bugzilla/show_bug.cgi?id=70038

--- Comment #1 from Remy Maucherat <re...@apache.org> ---
The code there is:
    public Object clone() {
        try {
            Cookie clone = (Cookie) super.clone();
            if (attributes != null) {
                clone.attributes = new
TreeMap<>(String.CASE_INSENSITIVE_ORDER);
                clone.attributes.putAll(attributes);
            }
            return clone;
        } catch (CloneNotSupportedException e) {
            throw new RuntimeException(e.getMessage());
        }
    }

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org