[
https://issues.apache.org/jira/browse/OAK-880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13693121#comment-13693121
]
Michael Dürig commented on OAK-880:
-----------------------------------
Since {{ChangeProcessor}} uses "standard" Jcr to Oak path mapping we need to
deicide whether trailing slashes are generally allowed or whether we want to
special case this for observation.
> 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
>
> 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