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 "Tomek Rękawek (JIRA)" <ji...@apache.org> on 2016/09/23 08:39:21 UTC

[jira] [Comment Edited] (OAK-4847) Support any types of node builders in the initializers

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

Tomek Rękawek edited comment on OAK-4847 at 9/23/16 8:38 AM:
-------------------------------------------------------------

Fixed for trunk in [r1762025|https://svn.apache.org/r1762025] and [r1762027|https://svn.apache.org/r1762027].


was (Author: tomek.rekawek):
Fixed for trunk in [1762025|https://svn.apache.org/1762025] and [1762027|https://svn.apache.org/1762027].

> Support any types of node builders in the initializers
> ------------------------------------------------------
>
>                 Key: OAK-4847
>                 URL: https://issues.apache.org/jira/browse/OAK-4847
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tomek Rękawek
>            Assignee: Tomek Rękawek
>             Fix For: 1.6, 1.5.11
>
>
> In case that one of the following classes:
> * org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent
> * org.apache.jackrabbit.oak.security.privilege.PrivilegeInitializer
> * org.apache.jackrabbit.oak.security.user.UserInitializer
> tries to initialize a NodeBuilder which is not derived from the MemoryNodeState or ModifiedNodeState, it breaks with an exception:
> {noformat}
> java.lang.IllegalArgumentException
> 	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:7
> 7)
> 	at org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore.merge(MemoryNo
> deStore.java:126)
> 	at
> org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:249)
> (...)
> 	at
> org.apache.jackrabbit.oak.plugins.nodetype.write.NodeTypeRegistry.regis
> terBuiltIn(NodeTypeRegistry.java:86)
> 	at
> org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent.initial
> ize(InitialContent.java:120)
> {noformat}
> It can be fixed wrapping the node state passed to the MemoryNodeStore constructor with a MemoryNodeState.



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