1
1
/*
2
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -46,8 +46,8 @@ private static void testCookieStore() throws Exception {
46
46
// Let's test the default path
47
47
lst .add ("myCookie1=foo" );
48
48
// Then some alternate expires format
49
- lst .add ("myCookie2=bar; path=/dir; expires=Tue , 19 Aug 2025 16:00:00 GMT" );
50
- lst .add ("myCookie3=test; path=/dir; expires=Tue Aug 19 2025 16:00:00 GMT-0100" );
49
+ lst .add ("myCookie2=bar; path=/dir; expires=Fri , 19 Aug 4242 16:00:00 GMT" );
50
+ lst .add ("myCookie3=test; path=/dir; expires=Fri Aug 19 4242 16:00:00 GMT-0100" );
51
51
// Then Netscape draft cookies and domains
52
52
lst .add ("myCookie4=test; domain=.sun.com; path=/dir/foo" );
53
53
HashMap <String , List <String >> map = new HashMap <String , List <String >>();
@@ -64,7 +64,8 @@ private static void testCookieStore() throws Exception {
64
64
List <HttpCookie > cookies = cs .getCookies ();
65
65
// There should be 5 cookies if all dates parsed correctly
66
66
if (cookies .size () != 5 ) {
67
- fail ("Should have 5 cookies. Got only " + cookies .size () + ", expires probably didn't parse correctly" );
67
+ fail ("unexpected cookies: " + cookies + ", should have 5 cookies. Got only "
68
+ + cookies .size () + ", expires probably didn't parse correctly" );
68
69
}
69
70
// Check Path for first Cookie
70
71
for (HttpCookie c : cookies ) {
0 commit comments