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

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

[~reschke], if so then yes. But shouldn't we detect them further up the stack 
where we iterate over the characters anyway? Even if this is only supposed to 
be a temporary solution until the name validation discussion is sorted out, why 
not put the work around where it makes more sense? 

Re. performance: let's just keep an eye on it and run the benchmarks to see how 
much this costs. My experience is that more than a few percent slowdown will 
escalate. 

> Segment store apparently doesn't round trip node names with unpaired 
> surrogates
> -------------------------------------------------------------------------------
>
>                 Key: OAK-5506
>                 URL: https://issues.apache.org/jira/browse/OAK-5506
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-tar
>    Affects Versions: 1.5.18
>            Reporter: Julian Reschke
>            Assignee: Francesco Mari
>         Attachments: ValidNamesTest.java
>
>
> Apparently, the following node name is accepted:
>    {{"foo\ud800"}}
> but a subsequent {{getPath()}} call fails:
> {noformat}
> javax.jcr.InvalidItemStateException: This item [/test_node/foo?] does not 
> exist anymore
>     at 
> org.apache.jackrabbit.oak.jcr.delegate.ItemDelegate.checkAlive(ItemDelegate.java:86)
>     at 
> org.apache.jackrabbit.oak.jcr.session.operation.ItemOperation.checkPreconditions(ItemOperation.java:34)
>     at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:615)
>     at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:205)
>     at 
> org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112)
>     at 
> org.apache.jackrabbit.oak.jcr.session.ItemImpl.getPath(ItemImpl.java:140)
>     at 
> org.apache.jackrabbit.oak.jcr.session.NodeImpl.getPath(NodeImpl.java:106)
>     at 
> org.apache.jackrabbit.oak.jcr.ValidNamesTest.nameTest(ValidNamesTest.java:271)
>     at 
> org.apache.jackrabbit.oak.jcr.ValidNamesTest.testUnpairedSurrogate(ValidNamesTest.java:259)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source){noformat}
> (test case follows)



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

Reply via email to