knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pzamp...@apache.org
Subject knox git commit: KNOX-1390 - Some filters are invoked before they have been initialized
Date Thu, 19 Jul 2018 18:11:33 GMT
Repository: knox
Updated Branches:
  refs/heads/v1.1.0 2748f1c04 -> 6040e0050


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/6040e005
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/6040e005
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/6040e005

Branch: refs/heads/v1.1.0
Commit: 6040e005005d227b1304f027e85981e3535d1c9d
Parents: 2748f1c
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 13:50:14 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/6040e005/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