Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 75607DEC6 for ; Tue, 24 Jul 2012 11:31:26 +0000 (UTC) Received: (qmail 79695 invoked by uid 500); 24 Jul 2012 11:31:25 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 79596 invoked by uid 500); 24 Jul 2012 11:31:24 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 79567 invoked by uid 99); 24 Jul 2012 11:31:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2012 11:31:23 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of anchela@adobe.com designates 64.18.1.187 as permitted sender) Received: from [64.18.1.187] (HELO exprod6og104.obsmtp.com) (64.18.1.187) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2012 11:31:13 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob104.postini.com ([64.18.5.12]) with SMTP ID DSNKUA6Ha/bZSn1S9yM8/kS7GFgmJjv3qpCG@postini.com; Tue, 24 Jul 2012 04:30:52 PDT Received: from inner-relay-4.eur.adobe.com (inner-relay-4.adobe.com [193.104.215.14]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q6OBSRk0010626 for ; Tue, 24 Jul 2012 04:28:27 -0700 (PDT) Received: from nacas01.corp.adobe.com (nacas01.corp.adobe.com [10.8.189.99]) by inner-relay-4.eur.adobe.com (8.12.10/8.12.9) with ESMTP id q6OBUgYs015316 for ; Tue, 24 Jul 2012 04:30:50 -0700 (PDT) Received: from eurhub01.eur.adobe.com (10.128.4.30) by nacas01.corp.adobe.com (10.8.189.99) with Microsoft SMTP Server (TLS) id 8.3.264.0; Tue, 24 Jul 2012 04:30:48 -0700 Received: from angela.eur.adobe.com (10.132.1.18) by eurhub01.eur.adobe.com (10.128.4.111) with Microsoft SMTP Server id 8.3.264.0; Tue, 24 Jul 2012 12:30:44 +0100 Message-ID: <500E8764.8040109@adobe.com> Date: Tue, 24 Jul 2012 13:30:44 +0200 From: Angela Schreiber User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: Subject: Comment regarding TreeImpl#remove Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit hi michael the implementation of Tree#remove starts with the following line: if (!isRoot() && parent.hasChild(name)) { and it seems to me that testing for the parent containing the Tree that i am having at hand is superfluous. is that the leftover of a refactoring or could it really occur that in this situation parent.hasChild returns false? if the latter was true, i think this line deserves a little comment explaining to the poor reader what are the circumstances of that behaviour. maybe we would even need some log output for that special case. what do you think? angela