[
https://issues.apache.org/jira/browse/JCR-3435?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jukka Zitting updated JCR-3435:
-------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.4.4)
Status: Resolved (was: Patch Available)
Looks good to me too.
Marking this as resolved for 2.5.3 since the fix is already in trunk.
I cleared the 2.4.4 fix version since the fix hasn't been backported yet.
Please re-add the version if/when backporting.
> NPE on parsing XPath query with child axis and star name at beginning
> (regression from 1.6.x)
> ---------------------------------------------------------------------------------------------
>
> Key: JCR-3435
> URL: https://issues.apache.org/jira/browse/JCR-3435
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-spi-commons
> Affects Versions: 2.4.2, 2.4.4, 2.5.2, 2.6
> Reporter: Jörg von Frantzius
> Assignee: Bart van der Schans
> Labels: queryparser, xpath
> Fix For: 2.5.3
>
> Attachments: xpathqueryparser.patch
>
>
> When adding the following to
> {{org.apache.jackrabbit.spi.commons.query.xpath.QueryFormatTest}}:
> {code}
> public void testChildStarName() throws Exception {
> checkStatement("//element(*, foo)[child::*/@bar = 'bla']");
> }
> {code}
> a NullPointerException is thrown while parsing:
> {code}
> java.lang.NullPointerException
> at
> org.apache.jackrabbit.spi.commons.query.xpath.QueryFormat.visit(QueryFormat.java:351)
> at
> org.apache.jackrabbit.spi.commons.query.RelationQueryNode.accept(RelationQueryNode.java:115)
> at
> org.apache.jackrabbit.spi.commons.query.xpath.QueryFormat.visit(QueryFormat.java:317)
> at
> org.apache.jackrabbit.spi.commons.query.LocationStepQueryNode.accept(LocationStepQueryNode.java:166)
> at
> org.apache.jackrabbit.spi.commons.query.xpath.QueryFormat.visit(QueryFormat.java:260)
> at
> org.apache.jackrabbit.spi.commons.query.PathQueryNode.accept(PathQueryNode.java:74)
> at
> org.apache.jackrabbit.spi.commons.query.xpath.QueryFormat.visit(QueryFormat.java:115)
> at
> org.apache.jackrabbit.spi.commons.query.QueryRootNode.accept(QueryRootNode.java:115)
> at
> org.apache.jackrabbit.spi.commons.query.xpath.QueryFormat.<init>(QueryFormat.java:75)
> at
> org.apache.jackrabbit.spi.commons.query.xpath.QueryFormat.toString(QueryFormat.java:95)
> at
> org.apache.jackrabbit.spi.commons.query.xpath.QueryFormatTest.checkStatement(QueryFormatTest.java:80)
> at
> org.apache.jackrabbit.spi.commons.query.xpath.QueryFormatTest.testChildStarName(QueryFormatTest.java:71)
> {code}
> This is a regression from Jackrabbit 1.6.5, where a similar test does run,
> i.e. parsing does not throw exception.
> The same NPE happens when "child::" is dropped, i.e. when the query looks
> like this:
> {code}
> "//element(*, foo)[*/@bar = 'bla']"
> {code}
--
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