[
https://issues.apache.org/jira/browse/OAK-1730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Davide Giannella updated OAK-1730:
----------------------------------
Attachment: OAK-1730.patch
Attaching a patch with an Integration Test for covering it and a fix for the
issue. A [pull request|https://github.com/apache/jackrabbit-oak/pull/17]
available for easy browsing.
> Possible NPE in OrderedContentMirrorStoreStrategy
> -------------------------------------------------
>
> Key: OAK-1730
> URL: https://issues.apache.org/jira/browse/OAK-1730
> Project: Jackrabbit Oak
> Issue Type: Task
> Components: core
> Affects Versions: 0.20.0
> Reporter: Tommaso Teofili
> Assignee: Tommaso Teofili
> Attachments: OAK-1730.patch
>
>
> _OrderedContentMirrorStoreStrategy_ may raise a NPE in _prune_ method as the
> _previous_ node in
> {code}
> ChildNodeEntry previous = findPrevious(
> index.getNodeState(), node.getNodeState());
> LOG.debug("previous: {}", previous);
> // (2) find the next element
> String next = node.getString(NEXT);
> if (next == null) {
> next = "";
> }
> // (3) re-link the previous to the next
> index.getChildNode(previous.getName()).setProperty(NEXT,
> next); // <-- NPE if previous is null
> {code}
> may be null
--
This message was sent by Atlassian JIRA
(v6.2#6252)