knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [knox] branch master updated: KNOX-1851 - remove the unnecessary instanceof check (#87)
Date Fri, 12 Apr 2019 01:13:22 GMT
This is an automated email from the ASF dual-hosted git repository.

more 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 32940ee  KNOX-1851 - remove the unnecessary instanceof check (#87)
32940ee is described below

commit 32940ee263b23336cbc995f3ddb4ba518e8713c4
Author: Sandeep Moré <moresandeep@gmail.com>
AuthorDate: Thu Apr 11 21:13:17 2019 -0400

    KNOX-1851 - remove the unnecessary instanceof check (#87)
---
 .../security/impl/ZookeeperRemoteAliasServiceProvider.java         | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasServiceProvider.java
b/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasServiceProvider.java
index 52c4462..5232aaf 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasServiceProvider.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasServiceProvider.java
@@ -45,12 +45,7 @@ public class ZookeeperRemoteAliasServiceProvider implements RemoteAliasServicePr
       final RemoteConfigurationRegistryClientService registryClientService = services
           .getService(ServiceType.REMOTE_REGISTRY_CLIENT_SERVICE);
 
-      /* Check to see if we already have ZooKeeperClientService instance, if so use it */
-      if (registryClientService instanceof ZooKeeperClientService) {
-        return new ZookeeperRemoteAliasService(localAliasService, ms,
-            registryClientService);
-
-      }
+      return new ZookeeperRemoteAliasService(localAliasService, ms, registryClientService);
     }
 
     throw new ConfigurationException(String.format(Locale.ROOT,"%s service not configured",
ZooKeeperClientService.TYPE));


Mime
View raw message