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 9DA4E200828 for ; Fri, 13 May 2016 10:56:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9B10716099F; Fri, 13 May 2016 08:56:35 +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 14D801602C0 for ; Fri, 13 May 2016 10:56:34 +0200 (CEST) Received: (qmail 80082 invoked by uid 500); 13 May 2016 08:56:34 -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 80071 invoked by uid 99); 13 May 2016 08:56:33 -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; Fri, 13 May 2016 08:56:33 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CFB75DFB73; Fri, 13 May 2016 08:56:33 +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: Fix/required open ports Content-Type: text/plain Message-Id: <20160513085633.CFB75DFB73@git1-us-west.apache.org> Date: Fri, 13 May 2016 08:56:33 +0000 (UTC) archived-at: Fri, 13 May 2016 08:56:35 -0000 Github user ahgittin commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/136#discussion_r63151939 --- Diff: software/base/src/main/java/org/apache/brooklyn/entity/software/base/InboundPortsUtils.java --- @@ -77,12 +82,17 @@ Set> configKeys = Sets.newHashSet(extraConfigKeys); configKeys.addAll(entity.getEntityType().getConfigKeys()); // Also add dynamically added config keys - configKeys.addAll(((EntityInternal)entity).config().getBag().getAllConfigAsConfigKeyMap().keySet()); + Map, ?> configuredConfigKeys = ImmutableMap.copyOf(((EntityInternal) entity).config().getBag().getAllConfigAsConfigKeyMap()); + configKeys.addAll(configuredConfigKeys.keySet()); --- End diff -- why create the intermediate `Immutable`? is there a risk if a value in the may is null that it will now throw NPE? --- 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. ---