ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r547753 - in /incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang: xpath10/runtime/XPath10ExpressionRuntime.java xpath20/runtime/XPath20ExpressionRuntime.java
Date Fri, 15 Jun 2007 18:20:32 GMT
Author: mriou
Date: Fri Jun 15 11:20:31 2007
New Revision: 547753

URL: http://svn.apache.org/viewvc?view=rev&rev=547753
Log:
Using ISO8601DateParser instead of XMLCaldendar to fix a bug in dates XPath evaluations.

Modified:
    incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/XPath10ExpressionRuntime.java
    incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java

Modified: incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/XPath10ExpressionRuntime.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/XPath10ExpressionRuntime.java?view=diff&rev=547753&r1=547752&r2=547753
==============================================================================
--- incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/XPath10ExpressionRuntime.java
(original)
+++ incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/XPath10ExpressionRuntime.java
Fri Jun 15 11:20:31 2007
@@ -18,6 +18,8 @@
  */
 package org.apache.ode.bpel.elang.xpath10.runtime;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.ode.bpel.common.FaultException;
 import org.apache.ode.bpel.elang.xpath10.o.OXPath10Expression;
 import org.apache.ode.bpel.explang.ConfigurationException;
@@ -26,10 +28,8 @@
 import org.apache.ode.bpel.explang.ExpressionLanguageRuntime;
 import org.apache.ode.bpel.o.OExpression;
 import org.apache.ode.utils.DOMUtils;
+import org.apache.ode.utils.ISO8601DateParser;
 import org.apache.ode.utils.xsd.Duration;
-import org.apache.ode.utils.xsd.XMLCalendar;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.jaxen.Context;
 import org.jaxen.ContextSupport;
 import org.jaxen.JaxenException;
@@ -40,7 +40,11 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.Text;
 
-import java.util.*;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * XPath 1.0 Expression Language run-time subsytem.
@@ -126,9 +130,8 @@
             EvaluationException {
 
         String literal = evaluateAsString(cexp, context);
-
         try {
-            return new XMLCalendar(literal);
+            return ISO8601DateParser.parseCal(literal);
         } catch (Exception ex) {
             String errmsg = "Invalid date: " + literal;
             __log.error(errmsg, ex);

Modified: incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java?view=diff&rev=547753&r1=547752&r2=547753
==============================================================================
--- incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
(original)
+++ incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
Fri Jun 15 11:20:31 2007
@@ -32,8 +32,8 @@
 import org.apache.ode.bpel.explang.ExpressionLanguageRuntime;
 import org.apache.ode.bpel.o.OExpression;
 import org.apache.ode.utils.DOMUtils;
+import org.apache.ode.utils.ISO8601DateParser;
 import org.apache.ode.utils.xsd.Duration;
-import org.apache.ode.utils.xsd.XMLCalendar;
 import org.apache.ode.utils.xsl.XslTransformHandler;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -137,11 +137,9 @@
     }
 
     public Calendar evaluateAsDate(OExpression cexp, EvaluationContext context) throws FaultException,
EvaluationException {
-
         String literal = evaluateAsString(cexp, context);
-
         try {
-            return new XMLCalendar(literal);
+            return ISO8601DateParser.parseCal(literal);
         } catch (Exception ex) {
             String errmsg = "Invalid date: " + literal;
             __log.error(errmsg, ex);



Mime
View raw message