OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] brooklyn-server pull request #982: Improve coercions esp with generics


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

    https://github.com/apache/brooklyn-server/pull/982#discussion_r214606998
  
    --- Diff: core/src/main/java/org/apache/brooklyn/util/core/task/ValueResolver.java ---
    @@ -251,9 +255,23 @@ public ResolverBuilderPretype(Object v) {
             else return Maybe.absent("No default value set");
         }
         
    -    /** causes nested structures (maps, lists) to be descended and nested unresolved values resolved */
    +    /** causes nested structures (maps, lists) to be descended and nested unresolved values resolved.
    +     * for legacy reasons this sets deepTraversalUsesRootType.
    +     * @deprecated use {@link #deep(boolean, boolean)} */
         public ValueResolver<T> deep(boolean forceDeep) {
    +        return deep(true, true);
    +    }
    +    /** causes nested structures (maps, lists) to be descended and nested unresolved values resolved.
    +     * if the second argument is true, the type specified here is used against non-map/iterable items
    +     * inside maps and iterables encountered. if false, any generic signature on the supplied type
    +     * is traversed to match contained items. if null (default), it is inferred from the type,
    +     * those with generics mean true, and those without mean false. 
    --- End diff --
    
    Is it not the other way round: "those with generics mean false, and those without mean true"?


---