knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pzamp...@apache.org
Subject [3/4] knox git commit: KNOX-1390 - Some filters are invoked before they have been initialized
Date Thu, 19 Jul 2018 19:14:05 GMT
KNOX-1390 - Some filters are invoked before they have been initialized


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/c3851dd8
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/c3851dd8
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/c3851dd8

Branch: refs/heads/master
Commit: c3851dd8686003400fec75132526e08c18455510
Parents: 9482351
Author: Phil Zampino <pzampino@apache.org>
Authored: Thu Jul 19 13:50:14 2018 -0400
Committer: Phil Zampino <pzampino@apache.org>
Committed: Thu Jul 19 14:29:07 2018 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/knox/gateway/GatewayFilter.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/c3851dd8/gateway-server/src/main/java/org/apache/knox/gateway/GatewayFilter.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/GatewayFilter.java b/gateway-server/src/main/java/org/apache/knox/gateway/GatewayFilter.java
index b88691e..fad2dce 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/GatewayFilter.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/GatewayFilter.java
@@ -398,8 +398,9 @@ public class GatewayFilter implements Filter {
           if( clazz == null ) {
             clazz = getClazz();
           }
-          instance = clazz.newInstance();
-          instance.init( this );
+          Filter f = clazz.newInstance();
+          f.init(this);
+          instance = f;
         } catch( Exception e ) {
           throw new ServletException( e );
         }


Mime
View raw message