jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: svn commit: r1490258 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
Date Thu, 06 Jun 2013 13:18:36 GMT
Hi,

On Thu, Jun 6, 2013 at 4:01 PM, Michael Dürig <mduerig@apache.org> wrote:
> On 6.6.13 13:41, jukka@apache.org wrote:
>>       private Head head() {
>> -        return head.update();
>> +        Head newHead = head.update();
>> +        if (newHead != head) {
>> +            head = newHead;
>> +        }
>> +        return newHead;
>>       }
>
> Isn't this the same as
>
> return head = head.update()

It is, except for the nice side-effect of being able to easily set a
breakpoint on state transitions.

BR,

Jukka Zitting

Mime
View raw message