Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A8D6BD14A for ; Wed, 3 Oct 2012 08:48:08 +0000 (UTC) Received: (qmail 21035 invoked by uid 500); 3 Oct 2012 08:48:08 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 20992 invoked by uid 500); 3 Oct 2012 08:48:08 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 20976 invoked by uid 99); 3 Oct 2012 08:48:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 08:48:07 +0000 Date: Wed, 3 Oct 2012 19:48:07 +1100 (NCT) From: "Alex Parvulescu (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <1845425890.158282.1349254087781.JavaMail.jiratomcat@arcas> In-Reply-To: <578731509.146272.1349040967769.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (JCR-3435) NPE on parsing XPath query with child axis and star name at beginning (regression from 1.6.x) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-3435?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D134684= 22#comment-13468422 ]=20 Alex Parvulescu commented on JCR-3435: -------------------------------------- +1 it looks good to me =20 > NPE on parsing XPath query with child axis and star name at beginning (re= gression 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=C3=B6rg von Frantzius > Assignee: Bart van der Schans > Labels: queryparser, xpath > Fix For: 2.4.4, 2.6 > > Attachments: xpathqueryparser.patch > > > When adding the following to {{org.apache.jackrabbit.spi.commons.query.xp= ath.QueryFormatTest}}: > {code} > public void testChildStarName() throws Exception { > checkStatement("//element(*, foo)[child::*/@bar =3D 'bla']"); > } > {code} > a NullPointerException is thrown while parsing: > {code} > java.lang.NullPointerException > at org.apache.jackrabbit.spi.commons.query.xpath.QueryFormat.visi= t(QueryFormat.java:351) > at org.apache.jackrabbit.spi.commons.query.RelationQueryNode.acce= pt(RelationQueryNode.java:115) > at org.apache.jackrabbit.spi.commons.query.xpath.QueryFormat.visi= t(QueryFormat.java:317) > at org.apache.jackrabbit.spi.commons.query.LocationStepQueryNode.= accept(LocationStepQueryNode.java:166) > at org.apache.jackrabbit.spi.commons.query.xpath.QueryFormat.visi= t(QueryFormat.java:260) > at org.apache.jackrabbit.spi.commons.query.PathQueryNode.accept(P= athQueryNode.java:74) > at org.apache.jackrabbit.spi.commons.query.xpath.QueryFormat.visi= t(QueryFormat.java:115) > at org.apache.jackrabbit.spi.commons.query.QueryRootNode.accept(Q= ueryRootNode.java:115) > at org.apache.jackrabbit.spi.commons.query.xpath.QueryFormat.(QueryFormat.java:75) > at org.apache.jackrabbit.spi.commons.query.xpath.QueryFormat.toSt= ring(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 =3D 'bla']" > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira