[GitHub] brooklyn-server pull request #954: Changes access of `StringPredicates` clas...
Github user nakomis closed the pull request at: https://github.com/apache/brooklyn-server/pull/954 ---
[GitHub] brooklyn-server pull request #954: Changes access of `StringPredicates` clas...
Github user aledsage commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/954#discussion_r18174 --- Diff: utils/common/src/main/java/org/apache/brooklyn/util/text/StringPredicates.java --- @@ -40,7 +40,7 @@ return new IsBlank(); } -private static final class IsBlank implements Predicate { +public static final class IsBlank implements Predicate { --- 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. ---
[GitHub] brooklyn-server pull request #954: Changes access of `StringPredicates` clas...
GitHub user nakomis opened a pull request: https://github.com/apache/brooklyn-server/pull/954 Changes access of `StringPredicates` classes This allows them to be used in YAML, via $brooklyn:object You can merge this pull request into a Git repository by running: $ git pull https://github.com/nakomis/brooklyn-server string-predicates-access Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-server/pull/954.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #954 commit 1c45ced1517c6dd90d762274785fdd7e8133b660 Author: Martin HarrisDate: 2018-04-12T12:37:28Z Changes access of `StringPredicates` classes This allows them to be used in YAML, via $brooklyn:object ---