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

    https://github.com/apache/brooklyn-server/pull/488#discussion_r92845427
  
    --- Diff: 
utils/common/src/main/java/org/apache/brooklyn/util/javalang/coerce/EnumTypeCoercions.java
 ---
    @@ -70,11 +70,11 @@ public E apply(String input) {
         }
         
         @SuppressWarnings({ "unchecked", "rawtypes" })
    -    public static <T> Maybe<T> tryCoerceUntyped(String input, Class<T> 
targetType) {
    +    public static Maybe tryCoerceUntyped(String input, Class targetType) {
             if (input==null) return null;
             if (targetType==null) return Maybe.absent("Null enum type");
             if (!targetType.isEnum()) return Maybe.absent("Type 
'"+targetType+"' is not an enum");
    -        return tryCoerce(input, (Class<Enum>)targetType);
    +        return tryCoerce(input, targetType);
    --- End diff --
    
    I'd keep the generics as is and add a cast to `(Maybe<T>) ` of the return 
value (insert before `tryCoerce`).
    Credit to Eclipse's quick fix for this one :).



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