brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geomacy <>
Subject [GitHub] brooklyn-server pull request #734: Support ConfigKey deprecated names
Date Wed, 05 Jul 2017 11:49:58 GMT
Github user geomacy commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/brooklyn/core/location/ ---
    @@ -216,17 +216,14 @@ public AbstractLocation configure(Map<?,?> properties) {
    -        // allow config keys to be set by name (or deprecated name)
    +        // Allow config keys to be set by name (or deprecated name)
    -        // Aled thinks it would be sensible to remove the consumed flags below (i.e.
properties = ...).
    -        // However, that caused ClockerDynamicLocationPatternTest to fail because there
is a field of 
    -        // StubContainerLocation annotated with `@SetFromFlag("owner")`, as well as a
config key with 
    -        // name "owner" (and with `@SetFromFlag("owner")`) in the super-type (DynamicLocation).
    -        // However, that looks mad - do we really need to support it?!
    -        // I've preserved that behaviour (for now).
    -        ConfigUtilsInternal.setAllConfigKeys(properties, getLocationTypeInternal().getConfigKeys().values(),
    +        // The resulting `properties` will no longer contain the keys that we matched;
    +        // we will not also use them to for `SetFromFlag` etc.
    +        properties = ConfigUtilsInternal.setAllConfigKeys(properties, getLocationTypeInternal().getConfigKeys().values(),
             // NB: flag-setting done here must also be done in BasicLocationRebindSupport
    +        // Must call setFieldsFromFlagsWithBag, even if properites is empty, so defaults
are extracted from annotations
    --- End diff --
    typo `properites`

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