brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <>
Subject [GitHub] brooklyn-server pull request #462: Inherit config default values
Date Fri, 06 Jan 2017 17:42:24 GMT
Github user neykov commented on a diff in the pull request:
    --- Diff: api/src/main/java/org/apache/brooklyn/api/internal/
    @@ -147,27 +147,28 @@ public SpecT tagsReplace(Iterable<Object> tagsToReplace) {
         // it is a CatalogConfig or merely a config key, maybe introducing displayable, or
even priority 
         // (but note part of the reason for CatalogConfig.priority is that java reflection
doesn't preserve field order) .
         // see also comments on the camp SpecParameterResolver.
    +    // probably the thing to do is deprecate the ambiguous method in favour of an explicit
         public SpecT parameters(List<? extends SpecParameter<?>> parameters)
             return parametersReplace(parameters);
    -    /** adds the given parameters */
    +    /** adds the given parameters, new ones first so they dominate subsequent ones */
         public SpecT parametersAdd(List<? extends SpecParameter<?>> parameters)
             // parameters follows immutable pattern, unlike the other fields
             Set<SpecParameter<?>> params = MutableSet.<SpecParameter<?>>copyOf(parameters);
             Set<SpecParameter<?>> current = MutableSet.<SpecParameter<?>>copyOf(this.parameters);
    -        this.parameters = ImmutableList.<SpecParameter<?>>builder()
    +        return parametersReplace(ImmutableList.<SpecParameter<?>>builder()
    -                .build();
    -        return self();
    +                .build());
         /** replaces parameters with the given */
    -    public SpecT parametersReplace(List<? extends SpecParameter<?>> parameters)
    +    public SpecT parametersReplace(Collection<? extends SpecParameter<?>>
parameters) {
    --- End diff --
    `parameters` are ordered - that's why the signature requires a `List`. It's also consistent
with the other two parameters related methods.

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

View raw message