From be7dddc8a30e5a234bfd79abaeab9311a92d5ce1 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Fri, 18 Sep 2009 16:24:26 +0100 Subject: [PATCH] 6882609: Move default InMemoryCookieStore to java.net Remove static dependency on sun.net.www.protocol.http Reviewed-by: alanb, jccollet --- jdk/make/sun/net/FILES_java.gmk | 3 +-- jdk/src/share/classes/java/net/CookieManager.java | 2 +- .../www/protocol/http => java/net}/InMemoryCookieStore.java | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) rename jdk/src/share/classes/{sun/net/www/protocol/http => java/net}/InMemoryCookieStore.java (99%) diff --git a/jdk/make/sun/net/FILES_java.gmk b/jdk/make/sun/net/FILES_java.gmk index 5082c3d370f..329f0bc45e0 100644 --- a/jdk/make/sun/net/FILES_java.gmk +++ b/jdk/make/sun/net/FILES_java.gmk @@ -123,8 +123,7 @@ FILES_java = \ sun/net/idn/UCharacterEnums.java \ sun/net/idn/UCharacterDirection.java \ sun/net/idn/StringPrepDataReader.java \ - sun/net/idn/StringPrep.java \ - sun/net/www/protocol/http/InMemoryCookieStore.java + sun/net/idn/StringPrep.java ifeq ($(PLATFORM), windows) FILES_java += sun/net/www/protocol/http/NTLMAuthSequence.java diff --git a/jdk/src/share/classes/java/net/CookieManager.java b/jdk/src/share/classes/java/net/CookieManager.java index 32790a8f185..95de8c0db3b 100644 --- a/jdk/src/share/classes/java/net/CookieManager.java +++ b/jdk/src/share/classes/java/net/CookieManager.java @@ -157,7 +157,7 @@ public class CookieManager extends CookieHandler // if not specify CookieStore to use, use default one if (store == null) { - cookieJar = new sun.net.www.protocol.http.InMemoryCookieStore(); + cookieJar = new InMemoryCookieStore(); } else { cookieJar = store; } diff --git a/jdk/src/share/classes/sun/net/www/protocol/http/InMemoryCookieStore.java b/jdk/src/share/classes/java/net/InMemoryCookieStore.java similarity index 99% rename from jdk/src/share/classes/sun/net/www/protocol/http/InMemoryCookieStore.java rename to jdk/src/share/classes/java/net/InMemoryCookieStore.java index 2e7b54f70c0..697ca88d710 100644 --- a/jdk/src/share/classes/sun/net/www/protocol/http/InMemoryCookieStore.java +++ b/jdk/src/share/classes/java/net/InMemoryCookieStore.java @@ -23,7 +23,7 @@ * have any questions. */ -package sun.net.www.protocol.http; +package java.net; import java.net.URI; import java.net.CookieStore; @@ -43,7 +43,7 @@ import java.util.concurrent.locks.ReentrantLock; * @author Edward Wang * @since 1.6 */ -public class InMemoryCookieStore implements CookieStore { +class InMemoryCookieStore implements CookieStore { // the in-memory representation of cookies private List cookieJar = null;