You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2014/12/15 14:18:13 UTC

[jira] [Created] (OAK-2356) Logic for writing properties in SegmentWriter.writeNode looks off

Michael Dürig created OAK-2356:
----------------------------------

             Summary: Logic for writing properties in SegmentWriter.writeNode looks off
                 Key: OAK-2356
                 URL: https://issues.apache.org/jira/browse/OAK-2356
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: segmentmk
            Reporter: Michael Dürig
            Assignee: Michael Dürig
             Fix For: 1.0.9


As [mentioned | https://issues.apache.org/jira/browse/OAK-2192?focusedCommentId=14245381&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14245381] by [~alex.parvulescu], the condition at line 1096 of {{SegmentWriter}} looks off: 

{code}
} else if (!(before instanceof SegmentNodeState) || store.containsSegment(before.getRecordId().getSegmentId())) {
{code}

In fact it looks like a refactoring accident introduced with OAK-631

{code}
- || ((SegmentNodeState) before).getStore() != store) {
+ || store.containsSegment(((SegmentNodeState)before)
        .getRecordId().getSegmentId())) {
{code}

where the negation has just been forgotten. See https://github.com/apache/jackrabbit-oak/commit/d96eb8c3ea8738695780b6a03c4902f0ce1f337f#diff-cd2b669b9d707784b58ff1783748f932



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)