This is an automated email from the ASF dual-hosted git repository.

smolnar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new 53d9456dc KNOX-2756 - Fixing NPE caused by null GatewayConfig (#589)
53d9456dc is described below

commit 53d9456dc7ad725c30b73b38a52a751b55ae0dbb
Author: Sandor Molnar <[email protected]>
AuthorDate: Fri Jun 3 11:18:29 2022 +0200

    KNOX-2756 - Fixing NPE caused by null GatewayConfig (#589)
---
 .../gateway/topology/discovery/cm/ClouderaManagerServiceDiscovery.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/ClouderaManagerServiceDiscovery.java
 
b/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/ClouderaManagerServiceDiscovery.java
index 8b34cbb2e..dcf2c41fc 100644
--- 
a/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/ClouderaManagerServiceDiscovery.java
+++ 
b/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/ClouderaManagerServiceDiscovery.java
@@ -111,9 +111,8 @@ public class ClouderaManagerServiceDiscovery implements 
ServiceDiscovery, Cluste
 
     if (gatewayConfig != null) {
       
repository.setCacheEntryTTL(gatewayConfig.getClouderaManagerServiceDiscoveryRepositoryEntryTTL());
+      configureRetryParams(gatewayConfig);
     }
-
-    configureRetryParams(gatewayConfig);
   }
 
   private void configureRetryParams(GatewayConfig gatewayConfig) {

Reply via email to