Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1BBD2200B88 for ; Thu, 22 Sep 2016 11:08:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1A5BD160AD0; Thu, 22 Sep 2016 09:08:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 86E55160AAD for ; Thu, 22 Sep 2016 11:08:28 +0200 (CEST) Received: (qmail 33666 invoked by uid 500); 22 Sep 2016 09:08:27 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 33655 invoked by uid 99); 22 Sep 2016 09:08:27 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Sep 2016 09:08:27 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 611CBE03C0; Thu, 22 Sep 2016 09:08:27 +0000 (UTC) From: ahgittin To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-server pull request #340: ConfigMap refactor, respecting inheritanc... Content-Type: text/plain Message-Id: <20160922090827.611CBE03C0@git1-us-west.apache.org> Date: Thu, 22 Sep 2016 09:08:27 +0000 (UTC) archived-at: Thu, 22 Sep 2016 09:08:29 -0000 Github user ahgittin commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/340#discussion_r80000704 --- Diff: core/src/main/java/org/apache/brooklyn/core/internal/BrooklynProperties.java --- @@ -298,15 +298,20 @@ private static void addPropertiesFromMapSupplier(BrooklynProperties p, Supplier< @Override public T getConfig(HasConfigKey key); - @Override public T getConfig(HasConfigKey key, T defaultValue); - @Override + + /** + * Returns value stored against the given key, + * resolved (if it is a Task, possibly blocking), and coerced to the appropriate type, + * or given default value if not set, + * unless the default value is null in which case it returns the default. + */ public T getConfig(ConfigKey key, T defaultValue); - @Override - public Object getRawConfig(ConfigKey key); - + public Maybe getConfigRaw(ConfigKey key); + + /** Inheritance is ignored here. Preferable to use {@link #getConfigRaw(ConfigKey)}. */ --- End diff -- agree --- 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 infrastructure@apache.org or file a JIRA ticket with INFRA. ---