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/06/25 17:50:20 UTC

[jira] [Updated] (OAK-880) ChangeProcessor causes IllegalArgumentException when path filter ends with a slash

     [ https://issues.apache.org/jira/browse/OAK-880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig updated OAK-880:
------------------------------

    Attachment: OAK-880.patch

Attached path should fix this. No test case yet to assert this though.
                
> ChangeProcessor causes IllegalArgumentException when path filter ends with a slash
> ----------------------------------------------------------------------------------
>
>                 Key: OAK-880
>                 URL: https://issues.apache.org/jira/browse/OAK-880
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
>            Priority: Minor
>         Attachments: OAK-880.patch
>
>
> While we could argue that the path is an invalid absolute path if it ends with a slash, the backward compatibility problem remains. Jackrabbit accepts these kind of paths and strips off a trailing slash. I think Oak should behave the same.
> The exception stack trace looks like this when '/foo/bar/' is used to register the event listener:
> 25.06.2013 16:46:21.158 *ERROR* [pool-6-thread-4] org.apache.jackrabbit.oak.plugins.observation.ChangeProcessor Unable to generate or send events java.lang.IllegalArgumentException: '/foo/bar//bla' is not a valid path. double slash '//' not allowed.
>         at org.apache.jackrabbit.oak.namepath.NamePathMapperImpl$1.error(NamePathMapperImpl.java:104)
>         at org.apache.jackrabbit.oak.namepath.JcrPathParser.parse(JcrPathParser.java:92)
>         at org.apache.jackrabbit.oak.namepath.NamePathMapperImpl.getJcrPath(NamePathMapperImpl.java:119)
>         at org.apache.jackrabbit.oak.plugins.observation.ChangeProcessor$EventGeneratingNodeStateDiff.jcrPath(ChangeProcessor.java:234)
>         at org.apache.jackrabbit.oak.plugins.observation.ChangeProcessor$EventGeneratingNodeStateDiff.createChildDiff(ChangeProcessor.java:295)
>         at org.apache.jackrabbit.oak.spi.state.VisibleDiff.createChildDiff(VisibleDiff.java:109)
>         at org.apache.jackrabbit.oak.plugins.observation.SecurableNodeStateDiff$1.call(SecurableNodeStateDiff.java:116)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira