From: <fg...@us...> - 2012-04-04 16:02:29
|
Revision: 3892 http://openutils.svn.sourceforge.net/openutils/?rev=3892&view=rev Author: fgiust Date: 2012-04-04 16:02:23 +0000 (Wed, 04 Apr 2012) Log Message: ----------- CRIT-48 fix regression similar to CRIT-40 Modified Paths: -------------- magnoliamodules/branches/magnolia44/openutils-mgnlcriteria/pom.xml magnoliamodules/branches/magnolia44/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java magnoliamodules/branches/magnolia44/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/MagnoliaCriteriaTest.java Modified: magnoliamodules/branches/magnolia44/openutils-mgnlcriteria/pom.xml =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlcriteria/pom.xml 2012-04-04 15:18:02 UTC (rev 3891) +++ magnoliamodules/branches/magnolia44/openutils-mgnlcriteria/pom.xml 2012-04-04 16:02:23 UTC (rev 3892) @@ -177,9 +177,9 @@ </dependency> </dependencies> <properties> - <magnolia.version>4.4.4</magnolia.version> + <magnolia.version>4.4.6</magnolia.version> <jackrabbit.version>1.6.2</jackrabbit.version> <jcr.version>1.0</jcr.version> </properties> <!-- test running maven with -Djcr.version=2.0 -Djackrabbit.version=2.0.0 -Djcr.version=2.0 -Djackrabbit.version=2.1.0 --> -</project> \ No newline at end of file +</project> Modified: magnoliamodules/branches/magnolia44/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java 2012-04-04 15:18:02 UTC (rev 3891) +++ magnoliamodules/branches/magnolia44/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java 2012-04-04 16:02:23 UTC (rev 3892) @@ -155,7 +155,7 @@ else if (ch == '(') { // "(" is the beginning of an expression only when used with the element() function - if (StringUtils.endsWith(StringUtils.substring(path, i), "element")) + if (StringUtils.endsWith(StringUtils.substring(path, 0, i), "element")) { inXpathCondition++; xpathWithFunction = true; Modified: magnoliamodules/branches/magnolia44/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/MagnoliaCriteriaTest.java =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/MagnoliaCriteriaTest.java 2012-04-04 15:18:02 UTC (rev 3891) +++ magnoliamodules/branches/magnolia44/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/MagnoliaCriteriaTest.java 2012-04-04 16:02:23 UTC (rev 3892) @@ -110,7 +110,9 @@ criteria.add(Restrictions.eq("@property", "test")); String xpathExpression = criteria.toXpathExpression(); - Assert.assertEquals(xpathExpression, "//path/with(paren_x002c_thesis)/test//*[( (@property='test') )] "); + Assert.assertEquals( + xpathExpression, + "//path/with_x0028_paren_x002c_thesis_x0029_/test//*[( (@property='test') )] "); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |