This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
     new 75e51f77cc WICKET-7005: Cookie comments are not supported in Servlet 
6.x
75e51f77cc is described below

commit 75e51f77cc0f6a9b333853cd756ce9a272f16507
Author: Martin Tzvetanov Grigorov <[email protected]>
AuthorDate: Wed Feb 22 10:06:00 2023 +0200

    WICKET-7005: Cookie comments are not supported in Servlet 6.x
    
    Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
---
 .../java/org/apache/wicket/core/util/cookies/CookieUtilsTest.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/wicket-core/src/test/java/org/apache/wicket/core/util/cookies/CookieUtilsTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/core/util/cookies/CookieUtilsTest.java
index 3f1cdbd962..7334b9fd2f 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/core/util/cookies/CookieUtilsTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/core/util/cookies/CookieUtilsTest.java
@@ -17,6 +17,7 @@
 package org.apache.wicket.core.util.cookies;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.Arrays;
@@ -142,7 +143,7 @@ class CookieUtilsTest extends WicketTestCase
        void defaults()
        {
                CookieDefaults defaults = new CookieDefaults();
-               defaults.setComment("A comment");
+               defaults.setComment("A comment"); // comments are deprecated in 
Servlet 6.x
                defaults.setDomain("A domain");
                defaults.setMaxAge(123);
                defaults.setSecure(true);
@@ -153,7 +154,7 @@ class CookieUtilsTest extends WicketTestCase
                utils.save(key, value1);
                before(); // execute a request cycle, so the response cookie is 
send with the next request
                Cookie result = utils.getCookie(key);
-               assertEquals(defaults.getComment(), result.getComment());
+               assertNull(result.getComment());
        }
 
        private void copyCookieFromResponseToRequest()

Reply via email to