From 167f73f54e733beeeb052ee74f0d8fe8808f530a Mon Sep 17 00:00:00 2001 From: mhajas Date: Wed, 12 Feb 2020 15:41:06 +0100 Subject: [PATCH] KEYCLOAK-12969 Don't use GenericFilter in server-authz test application --- .../testsuite/servletauthz/TestFilter.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/testsuite/integration-arquillian/test-apps/servlet-authz/src/main/java/org/keycloak/testsuite/servletauthz/TestFilter.java b/testsuite/integration-arquillian/test-apps/servlet-authz/src/main/java/org/keycloak/testsuite/servletauthz/TestFilter.java index a70c0b9de6..846f236ddd 100644 --- a/testsuite/integration-arquillian/test-apps/servlet-authz/src/main/java/org/keycloak/testsuite/servletauthz/TestFilter.java +++ b/testsuite/integration-arquillian/test-apps/servlet-authz/src/main/java/org/keycloak/testsuite/servletauthz/TestFilter.java @@ -17,8 +17,9 @@ package org.keycloak.testsuite.servletauthz; +import javax.servlet.Filter; import javax.servlet.FilterChain; -import javax.servlet.GenericFilter; +import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; @@ -32,10 +33,16 @@ import org.keycloak.util.JsonSerialization; /** * @author Pedro Igor */ -public class TestFilter extends GenericFilter { +public class TestFilter implements Filter { + + @Override + public void init(FilterConfig filterConfig) throws ServletException { + + } + @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) - throws IOException, ServletException { + throws IOException { HttpServletRequest req = (HttpServletRequest) request; if (req.getRequestURI().endsWith("/body")) { @@ -46,4 +53,10 @@ public class TestFilter extends GenericFilter { writer.flush(); } } + + @Override + public void destroy() { + + } + }