Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/137#discussion_r71403945
--- 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 --
I probably agree with this, but I worry about the implications. The
`deferredSupplier.get()` call might be very slow. Are we always doing this in a
context where we accept that slowness (e.g. never called by `getNonBlocking()`
without first checking that it's not a deferredSupplier).
@alasdairhodge can you rebase this against master - we've fixed quite a few
non-deterministic test failures, so hopefully the jenkins build will be better
behaved this time.
---
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.
---