Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/484#discussion_r93063249
  
    --- Diff: 
utils/common/src/main/java/org/apache/brooklyn/util/text/Strings.java ---
    @@ -827,6 +828,33 @@ public static String ies(Iterator<?> x) {
             return result;
         }
     
    +    /**
    +     * Tries to convert v to a list of strings.
    +     * <p>
    +     * If v is <code>null</code> then the method returns an empty 
immutable list.
    +     * If v is {@link Iterable} or an <code>Object[]</code> then toString 
is called on its elements.
    +     * If v is a {@link String} then a singleton list containing v is 
returned.
    +     * Otherwise the method throws an {@link IllegalArgumentException}.
    +     */
    +    public static List<String> toStringList(Object v) {
    --- End diff --
    
    Would be good to add unit tests for this (but we can do that in a separate 
PR, given that this PR has just moved it from one place to another).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to