Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x 9fb48d836 -> f7e66e61e


WICKET-5648 CookieUtils - add #loadValues(), make #getCookie() public, properly 
initialize from the defaults

Remove the newly introduced CookieUtils#loadValues() method.
At http://markmail.org/message/6t5gaeb3c2h24r36 we decided to deprecate all 
multivalue related methods in 6.x and remove them in 7.x


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/89ce5c41
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/89ce5c41
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/89ce5c41

Branch: refs/heads/wicket-6.x
Commit: 89ce5c41be76ea7a7c9c4679e419c15d83aaed07
Parents: 9fb48d8
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Mon Aug 4 12:09:52 2014 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Mon Aug 4 12:09:52 2014 +0200

----------------------------------------------------------------------
 .../apache/wicket/util/cookies/CookieUtils.java  | 19 -------------------
 .../wicket/util/cookies/CookieUtilsTest.java     | 18 ------------------
 2 files changed, 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/89ce5c41/wicket-core/src/main/java/org/apache/wicket/util/cookies/CookieUtils.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/util/cookies/CookieUtils.java 
b/wicket-core/src/main/java/org/apache/wicket/util/cookies/CookieUtils.java
index af2d26e..0f1f315 100644
--- a/wicket-core/src/main/java/org/apache/wicket/util/cookies/CookieUtils.java
+++ b/wicket-core/src/main/java/org/apache/wicket/util/cookies/CookieUtils.java
@@ -123,25 +123,6 @@ public class CookieUtils
        }
 
        /**
-        * Retrieve an array of the cookie value split by {@link 
org.apache.wicket.markup.html.form.FormComponent#VALUE_SEPARATOR}.
-        *
-        * @param key
-        *          The cookie name
-        * @return The cookie value split by {@link 
org.apache.wicket.markup.html.form.FormComponent#VALUE_SEPARATOR}.
-        */
-       public final String[] loadValues(final String key)
-       {
-               final Cookie cookie = getCookie(key);
-               if (cookie != null)
-               {
-                       String value = cookie.getValue();
-                       String[] values = splitValue(value);
-                       return values;
-               }
-               return null;
-       }
-
-       /**
         * Retrieve the cookie value associated with the formComponent and load 
the model object with
         * the cookie value.
         * 

http://git-wip-us.apache.org/repos/asf/wicket/blob/89ce5c41/wicket-core/src/test/java/org/apache/wicket/util/cookies/CookieUtilsTest.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/cookies/CookieUtilsTest.java 
b/wicket-core/src/test/java/org/apache/wicket/util/cookies/CookieUtilsTest.java
index 2068cf4..9e6cf40 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/cookies/CookieUtilsTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/cookies/CookieUtilsTest.java
@@ -17,10 +17,8 @@
 package org.apache.wicket.util.cookies;
 
 import static org.hamcrest.Matchers.arrayContaining;
-import static org.hamcrest.Matchers.contains;
 import static org.hamcrest.Matchers.emptyArray;
 import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.equalToIgnoringCase;
 import static org.hamcrest.Matchers.is;
 
 import java.util.Arrays;
@@ -35,8 +33,6 @@ import org.apache.wicket.WicketTestCase;
 import org.apache.wicket.markup.html.form.FormComponent;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.util.cookies.CookieValuePersisterTestPage.TestForm;
-import org.apache.wicket.util.string.Strings;
-import org.hamcrest.Matchers;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -192,20 +188,6 @@ public class CookieUtilsTest extends WicketTestCase
        }
 
        @Test
-       public void saveLoadValues()
-       {
-               CookieUtils utils = new CookieUtils();
-               String value1 = "value one";
-               String value2 = "value two";
-               String value3 = "value three";
-               String key = "key";
-               utils.save(key, value1, value2, value3);
-               before(); // execute a request cycle, so the response cookie is 
send with the next request
-               String[] result = utils.loadValues(key);
-               assertThat(result, is(Matchers.arrayContaining(value1, value2, 
value3)));
-       }
-
-       @Test
        public void defaults()
        {
                CookieDefaults defaults = new CookieDefaults();

Reply via email to