jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r809526 - in /jackrabbit/branches/jsr283: ./ jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeNameTest.java
Date Mon, 31 Aug 2009 10:05:59 GMT
Author: mreutegg
Date: Mon Aug 31 10:05:58 2009
New Revision: 809526

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

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

Propchange: jackrabbit/branches/jsr283/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 31 10:05:58 2009
@@ -1,3 +1,3 @@
 /jackrabbit/branches/1.5:794012,794100,794102
 /jackrabbit/sandbox/tripod-JCR-2209:795441-795863
-/jackrabbit/trunk:808408
+/jackrabbit/trunk:808408,808430

Modified: jackrabbit/branches/jsr283/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeNameTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/jsr283/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeNameTest.java?rev=809526&r1=809525&r2=809526&view=diff
==============================================================================
--- jackrabbit/branches/jsr283/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeNameTest.java
(original)
+++ jackrabbit/branches/jsr283/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeNameTest.java
Mon Aug 31 10:05:58 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