You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by je...@apache.org on 2012/04/18 16:59:58 UTC

svn commit: r1327533 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java

Author: jens
Date: Wed Apr 18 14:59:57 2012
New Revision: 1327533

URL: http://svn.apache.org/viewvc?rev=1327533&view=rev
Log:
Fix broken build

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java?rev=1327533&r1=1327532&r2=1327533&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java Wed Apr 18 14:59:57 2012
@@ -661,7 +661,14 @@ public class InMemoryQueryProcessor {
         }
         case DATETIME:
             // parse date from string
-            GregorianCalendar dt = CalendarHelper.fromString((String) rVal); // will throw exception if not parsable
+            GregorianCalendar dt;
+            
+            if (rVal instanceof String)
+                dt = CalendarHelper.fromString((String) rVal); // will throw exception if not parsable
+            else if (rVal instanceof GregorianCalendar)
+                dt = (GregorianCalendar) rVal;
+            else
+                throw new IllegalArgumentException("Unsupported date type " + rVal);
             // LOG.debug("left:" +
             // CalendarHelper.toString((GregorianCalendar)lValue) +
             // " right: " +