[ 
https://issues.apache.org/jira/browse/DRILL-8215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17533709#comment-17533709
 ] 

ASF GitHub Bot commented on DRILL-8215:
---------------------------------------

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?





> Remove SecurityContext from PluginConfigWrapper
> -----------------------------------------------
>
>                 Key: DRILL-8215
>                 URL: https://issues.apache.org/jira/browse/DRILL-8215
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Web Server
>    Affects Versions: 1.20.0
>            Reporter: Charles Givre
>            Priority: Major
>
> Drill-8155 introduced a bug in the PluginConfigWrapper by including the 
> SecurityContext in it.   This seemed to cause SerDe issues.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to