jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Commented] (OAK-5002) NPE when creating read only store
Date Tue, 25 Oct 2016 14:11:59 GMT

    [ https://issues.apache.org/jira/browse/OAK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15605416#comment-15605416
] 

Michael Dürig commented on OAK-5002:
------------------------------------

This is a regression introduced with OAK-4450. Before {{FileStore.getWriter}} was {{@Nonnull}}.
Now that method returns null in the case of the read only store. This causes problems when
passing a read only store to {{SegmentNodeStore#builder}}. 

> NPE when creating read only store
> ---------------------------------
>
>                 Key: OAK-5002
>                 URL: https://issues.apache.org/jira/browse/OAK-5002
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-tar
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>             Fix For: Segment Tar 0.0.18
>
>
> Using {{org.apache.jackrabbit.oak.segment.SegmentNodeStoreBuilders#builder(org.apache.jackrabbit.oak.segment.file.ReadOnlyFileStore)}}
to create a read only store results in a NPE:
> {noformat}
> Exception in thread "main" java.lang.NullPointerException
> 	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:192)
> 	at org.apache.jackrabbit.oak.segment.SegmentNodeStore.builder(SegmentNodeStore.java:148)
> 	at org.apache.jackrabbit.oak.segment.SegmentNodeStoreBuilders.builder(SegmentNodeStoreBuilders.java:69)
> {noformat}



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

Mime
View raw message