You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by pz...@apache.org on 2018/07/19 18:11:33 UTC
knox git commit: KNOX-1390 - Some filters are invoked before they
have been initialized
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 <pz...@apache.org>
Authored: Thu Jul 19 13:50:14 2018 -0400
Committer: Phil Zampino <pz...@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 );
}