davsclaus commented on code in PR #27493:
URL: https://github.com/apache/camel/pull/27493#discussion_r4206947749


##########
components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/config_maps/vault/ConfigmapsDevConsole.java:
##########
@@ -128,10 +137,11 @@ protected Map<String, Object> doCallJson(Map<String, 
Object> options) {
             }
         }
 
-        // NOTE: kubernetes is dereferenced unconditionally here, same as the 
original code -
-        // preserved as-is rather than fixed, since this migration is about 
the response contract
-        List<String> sorted = new 
ArrayList<>(List.of(kubernetes.getSecrets().split(",")));
-        Collections.sort(sorted);
+        List<String> sorted = new ArrayList<>();
+        if (kubernetes != null && kubernetes.getConfigmaps() != null && 
!kubernetes.getConfigmaps().isEmpty()) {
+            sorted.addAll(List.of(kubernetes.getConfigmaps().split(",")));

Review Comment:
   Nit (not blocking): the names are not trimmed, so 
`camel.vault.kubernetescm.configmaps=a, b` shows `" b"`, and a blank value 
passes the `isEmpty()` guard. The same parsing is also copied in `doCallText` 
and in `SecretsDevConsole`. A small shared helper that splits, trims and drops 
blanks would cover all four places.



-- 
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: [email protected]

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

Reply via email to