Skip to content

Commit 0483b3e

Browse files
committed
Polish RequestRejectedHandler
Issue gh-5007
1 parent b826c79 commit 0483b3e

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

web/src/main/java/org/springframework/security/web/FilterChainProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public void doFilter(ServletRequest request, ServletResponse response,
183183
request.setAttribute(FILTER_APPLIED, Boolean.TRUE);
184184
doFilterInternal(request, response, chain);
185185
} catch (RequestRejectedException e) {
186-
requestRejectedHandler.handle((HttpServletRequest) request, (HttpServletResponse) response, e);
186+
this.requestRejectedHandler.handle((HttpServletRequest) request, (HttpServletResponse) response, e);
187187
}
188188
finally {
189189
SecurityContextHolder.clearContext();

web/src/main/java/org/springframework/security/web/firewall/DefaultRequestRejectedHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
2525
* Default implementation of {@link RequestRejectedHandler} that simply rethrows the exception.
2626
*
2727
* @author Leonard Brünings
28-
* @since 5.2
28+
* @since 5.4
2929
*/
3030
public class DefaultRequestRejectedHandler implements RequestRejectedHandler {
3131
@Override

web/src/main/java/org/springframework/security/web/firewall/HttpStatusRequestRejectedHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
2727
* A simple implementation of {@link RequestRejectedHandler} that sends an error with configurable status code.
2828
*
2929
* @author Leonard Brünings
30-
* @since 5.2
30+
* @since 5.4
3131
*/
3232
public class HttpStatusRequestRejectedHandler implements RequestRejectedHandler {
3333
private static final Log logger = LogFactory.getLog(HttpStatusRequestRejectedHandler.class);

web/src/main/java/org/springframework/security/web/firewall/RequestRejectedHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@
2626
* <code>RequestRejectedException</code>.
2727
*
2828
* @author Leonard Brünings
29-
* @since 5.2
29+
* @since 5.4
3030
*/
3131
public interface RequestRejectedHandler {
3232
// ~ Methods

web/src/test/java/org/springframework/security/web/firewall/DefaultRequestRejectedHandlerTest.java renamed to web/src/test/java/org/springframework/security/web/firewall/DefaultRequestRejectedHandlerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
2525
import org.junit.Assert;
2626
import org.junit.Test;
2727

28-
public class DefaultRequestRejectedHandlerTest {
28+
public class DefaultRequestRejectedHandlerTests {
2929

3030
@Test
3131
public void defaultRequestRejectedHandlerRethrowsTheException() throws Exception {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
2424

2525
import org.junit.Test;
2626

27-
public class HttpStatusRequestRejectedHandlerTest {
27+
public class HttpStatusRequestRejectedHandlerTests {
2828

2929
@Test
3030
public void httpStatusRequestRejectedHandlerUsesStatus400byDefault() throws Exception {

0 commit comments

Comments
 (0)