Code example for MalformedCookieException

0
            throw new IllegalArgumentException("Cookie may not be null");
        } 
        if (cookie instanceof SetCookie2) {
            if (cookie instanceof ClientCookie 
                    && !((ClientCookie) cookie).containsAttribute(ClientCookie.VERSION_ATTR)) {
                throw new MalformedCookieException(
                        "Violates RFC 2965. Version attribute is required."); 
            } 
        } 
    } 
 
    public boolean match(final Cookie cookie, final CookieOrigin origin) {
        return true; 
    } 
 
}