Code example for Cookie

Methods: getVersion

0
    public void validate(final Cookie cookie, final CookieOrigin origin) 
            throws MalformedCookieException { 
        if (cookie == null) {
            throw new IllegalArgumentException("Cookie may not be null");
        } 
        if (cookie.getVersion() < 0) {
            throw new MalformedCookieException("Cookie version may not be negative");
        } 
    } 
     
}