Skip to content

Commit

Permalink
Merge pull request #859 from mwringe/BZ1477223
Browse files Browse the repository at this point in the history
[HWKMETRICS-713] fix order of OpenShift handlers
  • Loading branch information
stefannegrea authored Aug 2, 2017
2 parents 3493e19 + 2105b0a commit 261edc5
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,6 @@ public void handleDeployment(DeploymentInfo deploymentInfo, ServletContext servl
final Pattern insecurePattern = insecureEndpointPattern;
final Pattern postQuery = postQueryPattern;

ImmediateInstanceFactory<EventListener> instanceFactory = new ImmediateInstanceFactory<>(new SCListener());
deploymentInfo.addListener(new ListenerInfo(SCListener.class, instanceFactory));
deploymentInfo.addInitialHandlerChainWrapper(containerHandler -> {
openshiftAuthHandler = new OpenshiftAuthHandler(containerHandler, cName, rName, insecurePattern, postQuery);
return openshiftAuthHandler;
});

if (DISABLE_NAMESPACE_FILTER.equalsIgnoreCase("true")) {
log.info("The OpenShift Namespace Filter has been disabled via the 'DISABLE_NAMESPACE_FILTER' system property.");
}
Expand All @@ -109,6 +102,14 @@ public void handleDeployment(DeploymentInfo deploymentInfo, ServletContext servl
return namespaceHandler;
});
}

ImmediateInstanceFactory<EventListener> instanceFactory = new ImmediateInstanceFactory<>(new SCListener());
deploymentInfo.addListener(new ListenerInfo(SCListener.class, instanceFactory));
deploymentInfo.addInitialHandlerChainWrapper(containerHandler -> {
openshiftAuthHandler = new OpenshiftAuthHandler(containerHandler, cName, rName, insecurePattern, postQuery);
return openshiftAuthHandler;
});

}

private class SCListener implements ServletContextListener {
Expand Down

0 comments on commit 261edc5

Please sign in to comment.