diff options
author | Matteo Mara <matteo.mara@sonarsource.com> | 2023-01-09 10:21:46 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-01-10 20:03:01 +0000 |
commit | 295a87208f8c9898fbdc733a438587dc03a16877 (patch) | |
tree | 9771ee3245ab6e978b20b9d8b800450947fc7199 /server/sonar-webserver-core/src | |
parent | 8868a5ff310c74f44f2c94e46ba31065017f50b4 (diff) | |
download | sonarqube-295a87208f8c9898fbdc733a438587dc03a16877.tar.gz sonarqube-295a87208f8c9898fbdc733a438587dc03a16877.zip |
[NO-JIRA] Remove reported code smells about usage of instanceof
Diffstat (limited to 'server/sonar-webserver-core/src')
-rw-r--r-- | server/sonar-webserver-core/src/main/java/org/sonar/server/platform/web/RootFilter.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/web/RootFilter.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/web/RootFilter.java index dfe49682045..4803903e9f9 100644 --- a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/web/RootFilter.java +++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/web/RootFilter.java @@ -58,8 +58,7 @@ public class RootFilter implements Filter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { - if (request instanceof HttpServletRequest) { - HttpServletRequest httpRequest = (HttpServletRequest) request; + if (request instanceof HttpServletRequest httpRequest) { HttpServletResponse httpResponse = (HttpServletResponse) response; try { chain.doFilter(new ServletRequestWrapper(httpRequest), httpResponse); |