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

    https://github.com/apache/brooklyn-server/pull/954#discussion_r181700004
  
    --- Diff: 
utils/common/src/main/java/org/apache/brooklyn/util/text/StringPredicates.java 
---
    @@ -40,7 +40,7 @@
             return new IsBlank<T>();
         }
     
    -    private static final class IsBlank<T extends CharSequence> implements 
Predicate<T> {
    +    public static final class IsBlank<T extends CharSequence> implements 
Predicate<T> {
    --- End diff --
    
    Can you instead use the static methods, rather than instantiating the 
classes directly?
    
    For example:
    ```
    $brooklyn:object:
      type: org.apache.brooklyn.util.text.StringPredicates
      factoryMethod.name: containsLiteralIgnoreCase
      factoryMethod.args:
        - myarg1
    ```
    
    For the same reasons as we want the classes private in Java code, I think 
it's good to not access them directly in Brooklyn YAML either.


---

Reply via email to