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 2013/11/19 10:51:22 UTC

[jira] [Commented] (OAK-552) AssertionError in MicroKernel.commit()

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

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

@Ignored test case at http://svn.apache.org/r1543358. 

Note that the test behaves differently depending on whether assertions are enabled or not. In the former case it will throw an {{AssertionError}}. In the latter it will create a node with an empty name:

{code}
mk.getNodes("/x", ...);
{":childNodeCount":1,"":{":childNodeCount":0}}
{code}

> AssertionError in MicroKernel.commit()
> --------------------------------------
>
>                 Key: OAK-552
>                 URL: https://issues.apache.org/jira/browse/OAK-552
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: mk
>            Reporter: Michael Dürig
>
> {code}
> mk.commit("", "-\"/x/\"", null, null);
> {code}
> results in 
> {code}
> java.lang.AssertionError
> 	at org.apache.jackrabbit.oak.commons.PathUtils.concat(PathUtils.java:277)
> 	at org.apache.jackrabbit.mk.core.MicroKernelImpl.commit(MicroKernelImpl.java:437)
> 	at org.apache.jackrabbit.mk.MicroKernelImplTest.foo(MicroKernelImplTest.java:424)
> {code}
> since according to {{PathUtils}} {{/x/}} is not a valid path. 
> The commit method should throw an {{IllegalArgumentException}} instead.



--
This message was sent by Atlassian JIRA
(v6.1#6144)