You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2022/04/27 21:18:11 UTC

[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #722: GUACAMOLE-641: Ensure empty strings within KSM record fields are handled as if the field value is absent.

mike-jumper commented on code in PR #722:
URL: https://github.com/apache/guacamole-client/pull/722#discussion_r860252754


##########
extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmRecordService.java:
##########
@@ -112,6 +112,29 @@ private <T> T getSingleValue(List<T> values) {
 
     }
 
+    /**
+     * Returns the single value stored in the given list of strings. If the

Review Comment:
   To clarify, the point of the fix is that `null` should be returned if the string is the _empty string_, but yes it does say that. See immediately after the sentence in question:
   
   > ... If the list is empty, contains multiple values, or contains only a single empty string, null is returned.
   
   It's also listed in the `@return`:
   
   ```
        * @return
        *     The single value stored in the given list, or null if the list is
        *     empty, contains multiple values, or contains only a single empty
        *     string.
        */
   ```



-- 
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-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org