hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1672852 - in /httpcomponents/httpclient/trunk/httpclient/src: main/java/org/apache/http/impl/cookie/ test/java/org/apache/http/impl/cookie/
Date Sat, 11 Apr 2015 09:41:10 GMT
Author: olegk
Date: Sat Apr 11 09:41:08 2015
New Revision: 1672852

URL: http://svn.apache.org/r1672852
Log:
Made RFC6265CookieSpec public with a protected constructor

Added:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpec.java
  (contents, props changed)
      - copied, changed from r1668099, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpecBase.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpec.java
  (contents, props changed)
      - copied, changed from r1668099, httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpecBase.java
Removed:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpecBase.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpecBase.java
Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265LaxSpec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265StrictSpec.java

Copied: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpec.java
(from r1668099, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpecBase.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpec.java?p2=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpec.java&p1=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpecBase.java&r1=1668099&r2=1672852&rev=1672852&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpecBase.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpec.java
Sat Apr 11 09:41:08 2015
@@ -58,10 +58,10 @@ import org.apache.http.util.CharArrayBuf
 /**
  * Cookie management functions shared by RFC C6265 compliant specification.
  *
- * @since 4.4
+ * @since 4.5
  */
 @ThreadSafe
-class RFC6265CookieSpecBase implements CookieSpec {
+public class RFC6265CookieSpec implements CookieSpec {
 
     private final static char PARAM_DELIMITER  = ';';
     private final static char COMMA_CHAR       = ',';
@@ -80,7 +80,7 @@ class RFC6265CookieSpecBase implements C
     private final Map<String, CookieAttributeHandler> attribHandlerMap;
     private final TokenParser tokenParser;
 
-    RFC6265CookieSpecBase(final CommonCookieAttributeHandler... handlers) {
+    protected RFC6265CookieSpec(final CommonCookieAttributeHandler... handlers) {
         super();
         this.attribHandlers = handlers.clone();
         this.attribHandlerMap = new ConcurrentHashMap<String, CookieAttributeHandler>(handlers.length);

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpec.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpec.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265CookieSpec.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265LaxSpec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265LaxSpec.java?rev=1672852&r1=1672851&r2=1672852&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265LaxSpec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265LaxSpec.java
Sat Apr 11 09:41:08 2015
@@ -39,7 +39,7 @@ import org.apache.http.cookie.CommonCook
  * @since 4.4
  */
 @ThreadSafe
-public class RFC6265LaxSpec extends RFC6265CookieSpecBase {
+public class RFC6265LaxSpec extends RFC6265CookieSpec {
 
     public RFC6265LaxSpec() {
         super(new BasicPathHandler(),

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265StrictSpec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265StrictSpec.java?rev=1672852&r1=1672851&r2=1672852&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265StrictSpec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC6265StrictSpec.java
Sat Apr 11 09:41:08 2015
@@ -39,7 +39,7 @@ import org.apache.http.cookie.CommonCook
  * @since 4.4
  */
 @ThreadSafe
-public class RFC6265StrictSpec extends RFC6265CookieSpecBase {
+public class RFC6265StrictSpec extends RFC6265CookieSpec {
 
     final static String[] DATE_PATTERNS = {
         DateUtils.PATTERN_RFC1123,

Copied: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpec.java
(from r1668099, httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpecBase.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpec.java?p2=httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpec.java&p1=httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpecBase.java&r1=1668099&r2=1672852&rev=1672852&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpecBase.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpec.java
Sat Apr 11 09:41:08 2015
@@ -42,7 +42,7 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.mockito.Mockito;
 
-public class TestRFC6265CookieSpecBase {
+public class TestRFC6265CookieSpec {
 
     @Test
     public void testParseCookieBasics() throws Exception {
@@ -51,7 +51,7 @@ public class TestRFC6265CookieSpecBase {
         final CommonCookieAttributeHandler h2 = Mockito.mock(CommonCookieAttributeHandler.class);
         Mockito.when(h2.getAttributeName()).thenReturn("that");
 
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase(h1, h2);
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec(h1, h2);
 
         final Header header = new BasicHeader("Set-Cookie", "name = value ; this = stuff;");
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
@@ -74,7 +74,7 @@ public class TestRFC6265CookieSpecBase {
 
     @Test
     public void testParseCookieQuotedValue() throws Exception {
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase();
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec();
 
         final Header header = new BasicHeader("Set-Cookie", "name = \" one, two, three; four
\" ; this = stuff;");
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
@@ -91,7 +91,7 @@ public class TestRFC6265CookieSpecBase {
 
     @Test(expected = MalformedCookieException.class)
     public void testParseCookieWrongHeader() throws Exception {
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase();
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec();
 
         final Header header = new BasicHeader("Set-Cookie2", "blah");
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
@@ -100,7 +100,7 @@ public class TestRFC6265CookieSpecBase {
 
     @Test(expected = MalformedCookieException.class)
     public void testParseCookieMissingName() throws Exception {
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase();
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec();
 
         final Header header = new BasicHeader("Set-Cookie", "=blah ; this = stuff;");
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
@@ -109,7 +109,7 @@ public class TestRFC6265CookieSpecBase {
 
     @Test(expected = MalformedCookieException.class)
     public void testParseCookieMissingValue1() throws Exception {
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase();
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec();
 
         final Header header = new BasicHeader("Set-Cookie", "blah");
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
@@ -118,7 +118,7 @@ public class TestRFC6265CookieSpecBase {
 
     @Test(expected = MalformedCookieException.class)
     public void testParseCookieMissingValue2() throws Exception {
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase();
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec();
 
         final Header header = new BasicHeader("Set-Cookie", "blah;");
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
@@ -127,7 +127,7 @@ public class TestRFC6265CookieSpecBase {
 
     @Test
     public void testParseCookieEmptyValue() throws Exception {
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase();
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec();
 
         final Header header = new BasicHeader("Set-Cookie", "blah=;");
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
@@ -145,7 +145,7 @@ public class TestRFC6265CookieSpecBase {
         final CommonCookieAttributeHandler h2 = Mockito.mock(CommonCookieAttributeHandler.class);
         Mockito.when(h2.getAttributeName()).thenReturn("that");
 
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase(h1, h2);
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec(h1, h2);
 
         final Header header = new BasicHeader("Set-Cookie", "name = value ; p1 = v ; p2 =
v,0; p3 ; p4");
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
@@ -171,7 +171,7 @@ public class TestRFC6265CookieSpecBase {
         final CommonCookieAttributeHandler h2 = Mockito.mock(CommonCookieAttributeHandler.class);
         Mockito.when(h2.getAttributeName()).thenReturn("that");
 
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase(h1, h2);
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec(h1, h2);
 
         final Header header = new BasicHeader("Set-Cookie", "name = value ; p1 = v");
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
@@ -193,7 +193,7 @@ public class TestRFC6265CookieSpecBase {
         final CommonCookieAttributeHandler h2 = Mockito.mock(CommonCookieAttributeHandler.class);
         Mockito.when(h2.getAttributeName()).thenReturn("that");
 
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase(h1, h2);
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec(h1, h2);
 
         final Header header = new BasicHeader("Set-Cookie", "name = value ; p1 =");
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
@@ -215,7 +215,7 @@ public class TestRFC6265CookieSpecBase {
         final CommonCookieAttributeHandler h2 = Mockito.mock(CommonCookieAttributeHandler.class);
         Mockito.when(h2.getAttributeName()).thenReturn("that");
 
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase(h1, h2);
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec(h1, h2);
 
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
         final BasicClientCookie cookie = new BasicClientCookie("name", "value");
@@ -232,7 +232,7 @@ public class TestRFC6265CookieSpecBase {
         final CommonCookieAttributeHandler h2 = Mockito.mock(CommonCookieAttributeHandler.class);
         Mockito.when(h2.getAttributeName()).thenReturn("that");
 
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase(h1, h2);
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec(h1, h2);
 
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
         final BasicClientCookie cookie = new BasicClientCookie("name", "value");
@@ -253,7 +253,7 @@ public class TestRFC6265CookieSpecBase {
         final CommonCookieAttributeHandler h2 = Mockito.mock(CommonCookieAttributeHandler.class);
         Mockito.when(h2.getAttributeName()).thenReturn("that");
 
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase(h1, h2);
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec(h1, h2);
 
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
         final BasicClientCookie cookie = new BasicClientCookie("name", "value");
@@ -269,7 +269,7 @@ public class TestRFC6265CookieSpecBase {
 
     @Test
     public void testLegacy() throws Exception {
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase();
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec();
 
         Assert.assertEquals(0, cookiespec.getVersion());
         Assert.assertEquals(null, cookiespec.getVersionHeader());
@@ -279,7 +279,7 @@ public class TestRFC6265CookieSpecBase {
     public void testFormatCookiesBasics() throws Exception {
         final Cookie cookie1 = new BasicClientCookie("name1", "value");
 
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase();
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec();
         final List<Header> headers = cookiespec.formatCookies(Arrays.asList(cookie1));
         Assert.assertNotNull(headers);
         Assert.assertEquals(1, headers.size());
@@ -293,7 +293,7 @@ public class TestRFC6265CookieSpecBase {
         final Cookie cookie1 = new BasicClientCookie("name1", "value");
         final Cookie cookie2 = new BasicClientCookie("name2", "some value");
         final Cookie cookie3 = new BasicClientCookie("name3", "\"\\\"");
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase();
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec();
         final List<Header> headers = cookiespec.formatCookies(Arrays.asList(cookie1,
cookie2, cookie3));
         Assert.assertNotNull(headers);
         Assert.assertEquals(1, headers.size());
@@ -307,7 +307,7 @@ public class TestRFC6265CookieSpecBase {
         final CommonCookieAttributeHandler h1 = Mockito.mock(CommonCookieAttributeHandler.class);
         Mockito.when(h1.getAttributeName()).thenReturn("this");
 
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase(h1);
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec(h1);
 
         final Header header = new BasicHeader("Set-Cookie", "name = value ; this = stuff;
this = morestuff;");
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);
@@ -324,7 +324,7 @@ public class TestRFC6265CookieSpecBase {
         final CommonCookieAttributeHandler h2 = Mockito.mock(CommonCookieAttributeHandler.class);
         Mockito.when(h2.getAttributeName()).thenReturn("Max-Age");
 
-        final RFC6265CookieSpecBase cookiespec = new RFC6265CookieSpecBase(h1, h2);
+        final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec(h1, h2);
 
         final Header header = new BasicHeader("Set-Cookie", "name = value ; expires = stuff;
max-age = otherstuff;");
         final CookieOrigin origin = new CookieOrigin("host", 80, "/path/", true);

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpec.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpec.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestRFC6265CookieSpec.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message