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 705FE10CC1 for ; Thu, 6 Jun 2013 13:19:24 +0000 (UTC) Received: (qmail 20807 invoked by uid 500); 6 Jun 2013 13:19:24 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 20683 invoked by uid 500); 6 Jun 2013 13:19: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 20675 invoked by uid 99); 6 Jun 2013 13:19:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jun 2013 13:19:23 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jukka.zitting@gmail.com designates 209.85.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-ob0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jun 2013 13:19:18 +0000 Received: by mail-ob0-f172.google.com with SMTP id wo10so4678041obc.31 for ; Thu, 06 Jun 2013 06:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=fFc63ib1GUYa7RXTqjA2lWPtB/ZV3cXAkwx6EEJfju4=; b=v8nOQjl/EhG/NnqxuTrTcjcX5CaW4SWZkfc/YqYtBHBa3L150oSuIjyeYrhBGaRveR 5FOQu9PimZ4YzDX0HKOuERisaqu0h5tqtdCzmbwKoYITTibvX0OkTgC8jO/IO1NV9HBP X2jtbVbNmGJlVYGSHPvrVcVzE7lb6kofKm8hKmESsI2xBxfUchmUqJxhfvH84lj7h3Z2 L+nO+MoC70XW6QwFlk6moAeGMBLscpEM5jAJltM5TJxDOYze7TZ0cUDG37W/fiI+QRuD LfJIo7PVBCe2US/W0gSZVdh0nMuq9yY50IiuuXFQNIHTmuEhGU+YZm/LvnztR3Ol5JsY 8mAQ== X-Received: by 10.182.215.133 with SMTP id oi5mr824648obc.83.1370524737906; Thu, 06 Jun 2013 06:18:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.113.225 with HTTP; Thu, 6 Jun 2013 06:18:36 -0700 (PDT) In-Reply-To: <51B08812.9070700@apache.org> References: <20130606124129.2F45D23889BB@eris.apache.org> <51B08812.9070700@apache.org> From: Jukka Zitting Date: Thu, 6 Jun 2013 16:18:36 +0300 Message-ID: Subject: Re: svn commit: r1490258 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java To: Oak devs Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi, On Thu, Jun 6, 2013 at 4:01 PM, Michael D=FCrig wrote: > On 6.6.13 13:41, jukka@apache.org wrote: >> private Head head() { >> - return head.update(); >> + Head newHead =3D head.update(); >> + if (newHead !=3D head) { >> + head =3D newHead; >> + } >> + return newHead; >> } > > Isn't this the same as > > return head =3D head.update() It is, except for the nice side-effect of being able to easily set a breakpoint on state transitions. BR, Jukka Zitting