HTTPCLIENT-739: CookieIdentityComparator and CookiePathComparator now implement Serializable

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@618308 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2008-02-04 15:51:19 +00:00
parent 3dde3cc912
commit 137da8207d
4 changed files with 8 additions and 9 deletions

View File

@ -31,6 +31,7 @@
package org.apache.http.cookie;
import java.io.Serializable;
import java.util.Comparator;
/**
@ -43,7 +44,9 @@ import java.util.Comparator;
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*/
public class CookieIdentityComparator implements Comparator<Cookie> {
public class CookieIdentityComparator implements Serializable, Comparator<Cookie> {
private static final long serialVersionUID = 4466565437490631532L;
public int compare(final Cookie c1, final Cookie c2) {
int res = c1.getName().compareTo(c2.getName());

View File

@ -31,6 +31,7 @@
package org.apache.http.cookie;
import java.io.Serializable;
import java.util.Comparator;
/**
@ -47,7 +48,9 @@ import java.util.Comparator;
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*/
public class CookiePathComparator implements Comparator<Cookie> {
public class CookiePathComparator implements Serializable, Comparator<Cookie> {
private static final long serialVersionUID = 7523645369616405818L;
private String normalizePath(final Cookie cookie) {
String path = cookie.getPath();

View File

@ -30,10 +30,6 @@
package org.apache.http.conn.params;
import org.apache.http.conn.routing.TestAllRouting;
import org.apache.http.conn.ssl.TestAllSSL;
import org.apache.http.conn.util.TestAllUtil;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

View File

@ -41,14 +41,11 @@ import org.apache.http.HttpHost;
import org.apache.http.params.HttpParams;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.DefaultedHttpParams;
import org.apache.http.conn.params.HttpConnectionManagerParams;
import org.apache.http.conn.routing.HttpRoute;
// for hierarchy testing
import org.apache.http.impl.client.ClientParamsStack;
/**
* Unit tests for parameters.
* Trivial, but it looks better in the Clover reports.