[ 
https://issues.apache.org/jira/browse/KNOX-2399?focusedWorklogId=458654&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-458654
 ]

ASF GitHub Bot logged work on KNOX-2399:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Jul/20 14:18
            Start Date: 14/Jul/20 14:18
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on a change in pull request #361:
URL: https://github.com/apache/knox/pull/361#discussion_r454390890



##########
File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasService.java
##########
@@ -190,13 +190,18 @@ private static void checkPathsExist(final 
RemoteConfigurationRegistryClient remo
      *
      * @param clusterName
      *            cluster name
-     * @return List of all the aliases
+     * @return List of all the aliases (an empty list, in case there is no 
alias for the given cluster)
      */
     @Override
     public List<String> getAliasesForCluster(final String clusterName) throws 
AliasServiceException {
-        final List<String> localAliases = 
localAliasService.getAliasesForCluster(clusterName);
+        final List<String> localAliases = localAliasService == null ? 
Collections.emptyList() : localAliasService.getAliasesForCluster(clusterName);
         if (localAliases == null || localAliases.isEmpty()) {
-          return remoteClient == null ? new ArrayList<>() : 
remoteClient.listChildEntries(buildClusterEntryName(clusterName));
+          if (remoteClient != null) {
+            final List<String> remoteAliases = 
remoteClient.listChildEntries(buildClusterEntryName(clusterName));
+            return remoteAliases == null ? new ArrayList<>() : remoteAliases;

Review comment:
       I just wanted to be consistent with the `null` case.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 458654)
    Time Spent: 1h 10m  (was: 1h)

> Implement ZK token state service
> --------------------------------
>
>                 Key: KNOX-2399
>                 URL: https://issues.apache.org/jira/browse/KNOX-2399
>             Project: Apache Knox
>          Issue Type: Task
>    Affects Versions: 1.4.0
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 1.5.0
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Implement a new {{TokenStateService}} implementation which stores/fetches 
> token related metadata in Zookeeper. The new service should be configurable 
> to directly go to Zookeeper or use some local cache (e.g. a local alias 
> service).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to