jnturton commented on code in PR #2540: URL: https://github.com/apache/drill/pull/2540#discussion_r867783408
########## exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/CredentialResources.java: ########## @@ -125,11 +125,18 @@ public List<PluginConfigWrapper> getConfigsFor(@PathParam("group") String plugin default: return Collections.emptyList(); } - return StreamSupport.stream( + List<PluginConfigWrapper> results = StreamSupport.stream( Spliterators.spliteratorUnknownSize(storage.storedConfigs(filter).entrySet().iterator(), Spliterator.ORDERED), false) - .map(entry -> new PluginConfigWrapper(entry.getKey(), entry.getValue(), sc)) + .map(entry -> new PluginConfigWrapper(entry.getKey(), entry.getValue())) .sorted(PLUGIN_COMPARATOR) .collect(Collectors.toList()); + + if (results.isEmpty()) { + return Collections.emptyList(); Review Comment: Does this logic do anything? If `results` is empty then it already is an empty List, is it not? -- 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. To unsubscribe, e-mail: dev-unsubscr...@drill.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org