jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r825065 - in /jackrabbit/commons/jcr-tests/trunk: ./ src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeNameTest.java
Date Wed, 14 Oct 2009 09:10:38 GMT
Author: jukka
Date: Wed Oct 14 09:10:38 2009
New Revision: 825065

URL: http://svn.apache.org/viewvc?rev=825065&view=rev
Log:
JCR-2282: SQL2 parser may infer type for UncastLiteral from static analysis

Merged revision 808430 to the standalone jcr-tests codebase.

Modified:
    jackrabbit/commons/jcr-tests/trunk/   (props changed)
    jackrabbit/commons/jcr-tests/trunk/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeNameTest.java

Propchange: jackrabbit/commons/jcr-tests/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 09:10:38 2009
@@ -1,3 +1,3 @@
 /jackrabbit/branches/1.5/jackrabbit-jcr-tests:794012,794100,794102
 /jackrabbit/sandbox/tripod-JCR-2209/jackrabbit-jcr-tests:795441-795863
-/jackrabbit/trunk/jackrabbit-jcr-tests:806531,808408
+/jackrabbit/trunk/jackrabbit-jcr-tests:806531,808408,808430

Modified: jackrabbit/commons/jcr-tests/trunk/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeNameTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-tests/trunk/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeNameTest.java?rev=825065&r1=825064&r2=825065&view=diff
==============================================================================
--- jackrabbit/commons/jcr-tests/trunk/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeNameTest.java
(original)
+++ jackrabbit/commons/jcr-tests/trunk/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeNameTest.java
Wed Oct 14 09:10:38 2009
@@ -144,7 +144,7 @@
         }
         try {
             String stmt = "SELECT * FROM [" + testNodeType + "] AS s " +
-                    "WHERE NAME(s) = " + literal.getString();
+                    "WHERE NAME(s) = CAST(" + literal.getString() + " AS LONG)";
             qm.createQuery(stmt, Query.JCR_SQL2).execute();
             fail("NAME() comparison with LONG must fail with InvalidQueryException");
         } catch (InvalidQueryException e) {
@@ -162,7 +162,7 @@
         }
         try {
             String stmt = "SELECT * FROM [" + testNodeType + "] AS s " +
-                    "WHERE NAME(s) = " + literal.getString();
+                    "WHERE NAME(s) = CAST(" + literal.getString() + " AS BOOLEAN)";
             qm.createQuery(stmt, Query.JCR_SQL2).execute();
             fail("NAME() comparison with BOOLEAN must fail with InvalidQueryException");
         } catch (InvalidQueryException e) {



Mime
View raw message