mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 09:12:14 +00:00
Fix Checkstyle Errors
This commit is contained in:
parent
7fda87aecd
commit
5f833fa236
@ -112,7 +112,7 @@ class CookieCsrfTokenRepositoryTests {
|
||||
@Test
|
||||
void saveTokenSecureFlagTrue() {
|
||||
this.request.setSecure(false);
|
||||
this.repository.setCookieCustomizer((cookie)-> cookie.secure(Boolean.TRUE));
|
||||
this.repository.setCookieCustomizer((cookie) -> cookie.secure(Boolean.TRUE));
|
||||
CsrfToken token = this.repository.generateToken(this.request);
|
||||
this.repository.saveToken(token, this.request, this.response);
|
||||
Cookie tokenCookie = this.response.getCookie(CookieCsrfTokenRepository.DEFAULT_CSRF_COOKIE_NAME);
|
||||
@ -132,7 +132,7 @@ class CookieCsrfTokenRepositoryTests {
|
||||
@Test
|
||||
void saveTokenSecureFlagFalse() {
|
||||
this.request.setSecure(true);
|
||||
this.repository.setCookieCustomizer((cookie)-> cookie.secure(Boolean.FALSE));
|
||||
this.repository.setCookieCustomizer((cookie) -> cookie.secure(Boolean.FALSE));
|
||||
CsrfToken token = this.repository.generateToken(this.request);
|
||||
this.repository.saveToken(token, this.request, this.response);
|
||||
Cookie tokenCookie = this.response.getCookie(CookieCsrfTokenRepository.DEFAULT_CSRF_COOKIE_NAME);
|
||||
@ -504,9 +504,4 @@ class CookieCsrfTokenRepositoryTests {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.repository.setHeaderName(null));
|
||||
}
|
||||
|
||||
@Test
|
||||
void setCookieMaxAgeZeroIllegalArgumentException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.repository.setCookieCustomizer((cookie) -> cookie.maxAge(0)));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user