From 48eb4c0f8861339bfeefc64e78d64e76d012d1cc Mon Sep 17 00:00:00 2001
From: buczekp <buczekp>
Date: Mon, 15 Feb 2010 09:16:43 +0000
Subject: [PATCH] [LMS-1385] missing commit

SVN: 14729
---
 .../java/ch/systemsx/cisd/common/evaluator/Evaluator.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/source/java/ch/systemsx/cisd/common/evaluator/Evaluator.java b/common/source/java/ch/systemsx/cisd/common/evaluator/Evaluator.java
index e1e1cc36a70..92e9f9e67db 100644
--- a/common/source/java/ch/systemsx/cisd/common/evaluator/Evaluator.java
+++ b/common/source/java/ch/systemsx/cisd/common/evaluator/Evaluator.java
@@ -24,6 +24,7 @@ import org.python.core.PyException;
 import org.python.core.PyFloat;
 import org.python.core.PyInteger;
 import org.python.core.PyLong;
+import org.python.core.PyNone;
 import org.python.core.PyObject;
 import org.python.core.PyString;
 import org.python.core.PyStringMap;
@@ -175,7 +176,8 @@ public final class Evaluator
      * not know what will be the result type.
      * 
      * @return evaluation result which can be of Long, Double or String type. All other types are
-     *         converted to String representation.
+     *         converted to String representation except {@link PyNone} that represents null value
+     *         and will be converted to <code>null</code>.
      */
     public Object eval()
     {
@@ -190,6 +192,9 @@ public final class Evaluator
         } else if (obj instanceof PyFloat)
         {
             return new Double(((PyFloat) obj).getValue());
+        } else if (obj instanceof PyNone)
+        {
+            return null;
         } else
         {
             return obj.toString();
-- 
GitLab