From 137da8207de36a7b6ccc73084ad46f6083ddc9fc Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Mon, 4 Feb 2008 15:51:19 +0000 Subject: [PATCH] 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 --- .../org/apache/http/cookie/CookieIdentityComparator.java | 5 ++++- .../java/org/apache/http/cookie/CookiePathComparator.java | 5 ++++- .../java/org/apache/http/conn/params/TestAllConnParams.java | 4 ---- .../java/org/apache/http/conn/params/TestRouteParams.java | 3 --- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/module-client/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java b/module-client/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java index 414d3e897..a26d92cad 100644 --- a/module-client/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java +++ b/module-client/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java @@ -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 Oleg Kalnichevski */ -public class CookieIdentityComparator implements Comparator { +public class CookieIdentityComparator implements Serializable, Comparator { + + private static final long serialVersionUID = 4466565437490631532L; public int compare(final Cookie c1, final Cookie c2) { int res = c1.getName().compareTo(c2.getName()); diff --git a/module-client/src/main/java/org/apache/http/cookie/CookiePathComparator.java b/module-client/src/main/java/org/apache/http/cookie/CookiePathComparator.java index b38b2fa5c..749ddae37 100644 --- a/module-client/src/main/java/org/apache/http/cookie/CookiePathComparator.java +++ b/module-client/src/main/java/org/apache/http/cookie/CookiePathComparator.java @@ -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 Oleg Kalnichevski */ -public class CookiePathComparator implements Comparator { +public class CookiePathComparator implements Serializable, Comparator { + + private static final long serialVersionUID = 7523645369616405818L; private String normalizePath(final Cookie cookie) { String path = cookie.getPath(); diff --git a/module-client/src/test/java/org/apache/http/conn/params/TestAllConnParams.java b/module-client/src/test/java/org/apache/http/conn/params/TestAllConnParams.java index 98d543c9b..574672fb7 100644 --- a/module-client/src/test/java/org/apache/http/conn/params/TestAllConnParams.java +++ b/module-client/src/test/java/org/apache/http/conn/params/TestAllConnParams.java @@ -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; diff --git a/module-client/src/test/java/org/apache/http/conn/params/TestRouteParams.java b/module-client/src/test/java/org/apache/http/conn/params/TestRouteParams.java index 75b42060c..dd81f62a7 100644 --- a/module-client/src/test/java/org/apache/http/conn/params/TestRouteParams.java +++ b/module-client/src/test/java/org/apache/http/conn/params/TestRouteParams.java @@ -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.