Example usage for org.apache.commons.httpclient Cookie equals

List of usage examples for org.apache.commons.httpclient Cookie equals

Introduction

In this page you can find the example usage for org.apache.commons.httpclient Cookie equals.

Prototype

public boolean equals(Object paramObject) 

Source Link

Usage

From source file:org.eclipse.mylyn.internal.gerrit.core.client.GerritHttpClient.java

public void setXsrfCookie(Cookie xsrfCookie) {
    Cookie oldCookie;/*from w w  w .  ja v  a2s  .  c o m*/
    synchronized (this) {
        oldCookie = this.xsrfCookie;
        this.xsrfCookie = xsrfCookie;
        if (xsrfCookie == null) {
            this.obtainedXsrfKey = false;
        }
    }
    if (xsrfCookie != null) {
        if (!xsrfCookie.equals(oldCookie)) {
            httpClient.getState().addCookie(xsrfCookie);
        }
    } else {
        httpClient.getState().clear();
    }
    sessionChanged(xsrfCookie);
}