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 6709F200BC8 for ; Wed, 23 Nov 2016 14:25:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 65D24160AFB; Wed, 23 Nov 2016 13:25:02 +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 D645B160AFA for ; Wed, 23 Nov 2016 14:25:01 +0100 (CET) Received: (qmail 57958 invoked by uid 500); 23 Nov 2016 13:25:01 -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 57940 invoked by uid 99); 23 Nov 2016 13:25:00 -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; Wed, 23 Nov 2016 13:25:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B9BDEDFCC8; Wed, 23 Nov 2016 13:25:00 +0000 (UTC) From: geomacy To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-server pull request #454: LocalEntityManager: make fields private Content-Type: text/plain Message-Id: <20161123132500.B9BDEDFCC8@git1-us-west.apache.org> Date: Wed, 23 Nov 2016 13:25:00 +0000 (UTC) archived-at: Wed, 23 Nov 2016 13:25:02 -0000 Github user geomacy commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/454#discussion_r89313611 --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalEntityManager.java --- @@ -742,7 +742,7 @@ private boolean unmanageNonRecursive(Entity e) { if (e instanceof Group) { Collection members = ((Group)e).getMembers(); for (Entity member : members) { - if (!Entities.isNoLongerManaged(member)) member.removeGroup((Group)e); + if (!Entities.isNoLongerManaged(member)) ((EntityInternal)member).groups().remove((Group)e); --- End diff -- `removeGroup` is deprecated, but it's just defined as ```java public void removeGroup(Group group) { groups().remove(group); } ``` so I don't see how this change is changing anything really? Is it not just doing the same thing? The comments on removeGroup are slightly ambiguous but seem to suggest that the preferred thing to be doing here is calling `Group#removeMember`, which will update the group size sensors and so on. Same thought applies to the changes to `add` below. --- 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. ---