[
https://issues.apache.org/jira/browse/OAK-1468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13912921#comment-13912921
]
Thomas Mueller commented on OAK-1468:
-------------------------------------
The LIRS cache would already throw a NPE "The value may not be null" if the
cache loader returns null. Test case added in revision 1572053.
> CacheLIRS returns null value
> ----------------------------
>
> Key: OAK-1468
> URL: https://issues.apache.org/jira/browse/OAK-1468
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Affects Versions: 0.17.1
> Reporter: Marcel Reutegger
>
> While running some test I see the following NPE:
> {noformat}
> Caused by: java.lang.NullPointerException: null
> at
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.readChildren(DocumentNodeStore.java:629)
> at
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$3.call(DocumentNodeStore.java:589)
> at
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$3.call(DocumentNodeStore.java:586)
> at
> org.apache.jackrabbit.oak.cache.CacheLIRS$Segment.get(CacheLIRS.java:841)
> at org.apache.jackrabbit.oak.cache.CacheLIRS.get(CacheLIRS.java:212)
> at
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.getChildren(DocumentNodeStore.java:586)
> ... 25 common frames omitted
> {noformat}
> The NPE shouldn't be possible there, because the Callable implementation
> returns a non-null value (unless I'm terribly mistaken). The hasMore flag of
> the returned Children object is set before each of the returns statements in
> DocumentNodeStore.readChildren().
> Please note, this happened with a previous version of Oak where the default
> cache implementation was CacheLIRS. Right now, the DocumentNodeStore uses the
> Guava implementation per default.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)