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

    https://github.com/apache/brooklyn-server/pull/477#discussion_r92825861
  
    --- Diff: 
utils/common/src/main/java/org/apache/brooklyn/util/javalang/coerce/TypeCoercerExtensible.java
 ---
    @@ -119,8 +120,23 @@ public static TypeCoercerExtensible newEmpty() {
             if (targetTypeToken.getType() instanceof ParameterizedType) {
                 if (value instanceof Collection && 
Collection.class.isAssignableFrom(targetType)) {
                     result = tryCoerceCollection(value, targetTypeToken, 
targetType);
    +                
    +                if (result != null && result.isAbsent() && 
targetType.isInstance(value)) {
    +                    log.warn("Failed to coerce collection from " + 
value.getClass().getName() + " to " + targetTypeToken  
    +                            + "; returning uncoerced result to preserve 
(deprecated) backwards compatibility", 
    +                            Maybe.getException(result));
    +                    return Maybe.of((T)result);
    --- End diff --
    
    Should be `return Maybe.of( (T) value );`, but I don't understand how it's 
different from letting the code execution continue. Same for change below.


---
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