commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r391906 - in /jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env: jexl/JexlEvaluator.java jsp/ELEvaluator.java
Date Thu, 06 Apr 2006 05:36:32 GMT
Author: rahul
Date: Wed Apr  5 22:36:30 2006
New Revision: 391906

URL: http://svn.apache.org/viewcvs?rev=391906&view=rev
Log:
Make null expressions trivially evaluate to null.

Modified:
    jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/jexl/JexlEvaluator.java
    jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/jsp/ELEvaluator.java

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/jexl/JexlEvaluator.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/jexl/JexlEvaluator.java?rev=391906&r1=391905&r2=391906&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/jexl/JexlEvaluator.java
(original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/jexl/JexlEvaluator.java
Wed Apr  5 22:36:30 2006
@@ -62,6 +62,9 @@
      */
     public Object eval(final Context ctx, final String expr)
     throws SCXMLExpressionException {
+        if (expr == null) {
+            return null;
+        }
         JexlContext jexlCtx = null;
         if (ctx instanceof JexlContext) {
             jexlCtx = (JexlContext) ctx;
@@ -86,6 +89,9 @@
      */
     public Boolean evalCond(final Context ctx, final String expr)
     throws SCXMLExpressionException {
+        if (expr == null) {
+            return null;
+        }
         JexlContext jexlCtx = null;
         if (ctx instanceof JexlContext) {
             jexlCtx = (JexlContext) ctx;
@@ -110,6 +116,9 @@
      */
     public Node evalLocation(final Context ctx, final String expr)
     throws SCXMLExpressionException {
+        if (expr == null) {
+            return null;
+        }
         JexlContext jexlCtx = null;
         if (ctx instanceof JexlContext) {
             jexlCtx = (JexlContext) ctx;

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/jsp/ELEvaluator.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/jsp/ELEvaluator.java?rev=391906&r1=391905&r2=391906&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/jsp/ELEvaluator.java
(original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/jsp/ELEvaluator.java
Wed Apr  5 22:36:30 2006
@@ -72,6 +72,9 @@
      */
     public Object eval(final Context ctx, final String expr)
     throws SCXMLExpressionException {
+        if (expr == null) {
+            return null;
+        }
         VariableResolver vr = null;
         if (ctx instanceof VariableResolver) {
             vr = (VariableResolver) ctx;
@@ -97,6 +100,9 @@
      */
     public Boolean evalCond(final Context ctx, final String expr)
     throws SCXMLExpressionException {
+        if (expr == null) {
+            return null;
+        }
         VariableResolver vr = null;
         if (ctx instanceof VariableResolver) {
             vr = (VariableResolver) ctx;
@@ -122,6 +128,9 @@
      */
     public Node evalLocation(final Context ctx, final String expr)
     throws SCXMLExpressionException {
+        if (expr == null) {
+            return null;
+        }
         VariableResolver vr = null;
         if (ctx instanceof VariableResolver) {
             vr = (VariableResolver) ctx;



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message