mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-24 07:39:09 +00:00
Revert "Update MockCookie#parse(String) validation to align with Javadoc"
This reverts commit 8b894933ae due to
code freeze on main.
See gh-37134
This commit is contained in:
+1
-1
@@ -132,7 +132,7 @@ public class MockCookie extends Cookie {
|
||||
* @return the created cookie
|
||||
*/
|
||||
public static MockCookie parse(String setCookieHeader) {
|
||||
Assert.hasText(setCookieHeader, "Set-Cookie header must not be null or empty");
|
||||
Assert.notNull(setCookieHeader, "Set-Cookie header must not be null");
|
||||
String[] cookieParts = setCookieHeader.split("\\s*=\\s*", 2);
|
||||
Assert.isTrue(cookieParts.length == 2, () -> "Invalid Set-Cookie header '" + setCookieHeader + "'");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user