Skip to content

Commit 5f833fa

Browse files
committed
Fix Checkstyle Errors
1 parent 7fda87a commit 5f833fa

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

web/src/test/java/org/springframework/security/web/csrf/CookieCsrfTokenRepositoryTests.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void saveTokenSecure() {
112112
@Test
113113
void saveTokenSecureFlagTrue() {
114114
this.request.setSecure(false);
115-
this.repository.setCookieCustomizer((cookie)-> cookie.secure(Boolean.TRUE));
115+
this.repository.setCookieCustomizer((cookie) -> cookie.secure(Boolean.TRUE));
116116
CsrfToken token = this.repository.generateToken(this.request);
117117
this.repository.saveToken(token, this.request, this.response);
118118
Cookie tokenCookie = this.response.getCookie(CookieCsrfTokenRepository.DEFAULT_CSRF_COOKIE_NAME);
@@ -132,7 +132,7 @@ void saveTokenSecureFlagTrueUsingCustomizer() {
132132
@Test
133133
void saveTokenSecureFlagFalse() {
134134
this.request.setSecure(true);
135-
this.repository.setCookieCustomizer((cookie)-> cookie.secure(Boolean.FALSE));
135+
this.repository.setCookieCustomizer((cookie) -> cookie.secure(Boolean.FALSE));
136136
CsrfToken token = this.repository.generateToken(this.request);
137137
this.repository.saveToken(token, this.request, this.response);
138138
Cookie tokenCookie = this.response.getCookie(CookieCsrfTokenRepository.DEFAULT_CSRF_COOKIE_NAME);
@@ -504,9 +504,4 @@ void setHeaderNameNullIllegalArgumentException() {
504504
assertThatIllegalArgumentException().isThrownBy(() -> this.repository.setHeaderName(null));
505505
}
506506

507-
@Test
508-
void setCookieMaxAgeZeroIllegalArgumentException() {
509-
assertThatIllegalArgumentException().isThrownBy(() -> this.repository.setCookieCustomizer((cookie) -> cookie.maxAge(0)));
510-
}
511-
512507
}

0 commit comments

Comments
 (0)