Skip to content

Commit a982fb5

Browse files
Simplify if condition
Signed-off-by: Tran Ngoc Nhan <[email protected]>
1 parent 382caac commit a982fb5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

spring-web/src/main/java/org/springframework/web/filter/OncePerRequestFilter.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2025 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.
@@ -126,10 +126,7 @@ private boolean skipDispatch(HttpServletRequest request) {
126126
if (isAsyncDispatch(request) && shouldNotFilterAsyncDispatch()) {
127127
return true;
128128
}
129-
if (request.getAttribute(WebUtils.ERROR_REQUEST_URI_ATTRIBUTE) != null && shouldNotFilterErrorDispatch()) {
130-
return true;
131-
}
132-
return false;
129+
return request.getAttribute(WebUtils.ERROR_REQUEST_URI_ATTRIBUTE) != null && shouldNotFilterErrorDispatch();
133130
}
134131

135132
/**

0 commit comments

Comments
 (0)