You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by alasdairhodge <gi...@git.apache.org> on 2016/08/14 10:53:05 UTC

[GitHub] brooklyn-server pull request #137: FOR REVIEW: easier access for entity conf...

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

    https://github.com/apache/brooklyn-server/pull/137#discussion_r74699774
  
    --- Diff: core/src/main/java/org/apache/brooklyn/util/core/flags/TypeCoercions.java ---
    @@ -138,6 +139,9 @@ private TypeCoercions() {}
         @SuppressWarnings({ "unchecked" })
         public static <T> T coerce(Object value, TypeToken<T> targetTypeToken) {
             if (value==null) return null;
    +        if (value instanceof DeferredSupplier<?>) {
    +            value = ((DeferredSupplier<?>) value).get();
    --- End diff --
    
    @aledsage: Now that the coersion methods have been moved into `brooklyn-utils-common`, we can't implement this check as-is without adding a new dependency. `DeferredSupplier` is arguably also a "common utility" so could be moved, but that ovbiously has implications beyong this PR. Let's review.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---