Code example for MalformedCookieException

0
                        + "\". Domain of origin: \"" + host + "\"");
                } 
            } 
        } else { 
            if (!host.equals(domain)) {
                throw new MalformedCookieException(
                    "Illegal domain attribute \"" + domain 
                    + "\". Domain of origin: \"" + host + "\"");
            } 
        } 
    } 
     
    public boolean match(final Cookie cookie, final CookieOrigin origin) {
        if (cookie == null) {
            throw new IllegalArgumentException("Cookie may not be null");
        } 
        if (origin == null) {
            throw new IllegalArgumentException("Cookie origin may not be null");
        } 
        String host = origin.getHost();
        String domain = cookie.getDomain();