incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wi...@apache.org
Subject svn commit: r924834 - /incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java
Date Thu, 18 Mar 2010 14:36:43 GMT
Author: witek
Date: Thu Mar 18 14:36:43 2010
New Revision: 924834

URL: http://svn.apache.org/viewvc?rev=924834&view=rev
Log:
Log warning when presentation element value cannot be evaluated.

Modified:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java?rev=924834&r1=924833&r2=924834&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java
(original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java
Thu Mar 18 14:36:43 2010
@@ -228,7 +228,14 @@ public class TaskEvaluator {
         XQueryEvaluator evaluator = buildQueryEvaluator();
         for (TPresentationParameter p : task.getTaskDefinition().getPresentationParameters())
{
             XQueryEvaluator evaluator2 = buildQueryEvaluator();
-            Object v = evaluator2.evaluateExpression(XmlUtils.getStringContent(p.getContent()),
null).get(0);
+            List eavaluationResult = evaluator2.evaluateExpression(XmlUtils.getStringContent(p.getContent()),
null);
+            Object v = null;
+            if (!eavaluationResult.isEmpty()) {
+                v = eavaluationResult.get(0);
+            } else {
+                v = "ERROR";
+                __log.warn("Could not evaluate presentationParameter: " + p.getName());
+            }
             __log.debug("evaluated presentationParameter: " + p.getName() + " = " + v);
         	evaluator.bindVariable(QName.valueOf(p.getName()), v);
         }



Mime
View raw message