commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r381845 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/ExpressionFactory.java
Date Wed, 01 Mar 2006 00:20:56 GMT
Author: rahul
Date: Tue Feb 28 16:20:54 2006
New Revision: 381845

URL: http://svn.apache.org/viewcvs?rev=381845&view=rev
Log:
Log warning instead of silently ignoring expressions beyond the first (if there are more than
one).

Modified:
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/ExpressionFactory.java

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/ExpressionFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/ExpressionFactory.java?rev=381845&r1=381844&r2=381845&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/ExpressionFactory.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/ExpressionFactory.java
Tue Feb 28 16:20:54 2006
@@ -120,6 +120,14 @@
             tree = parser.parse(new StringReader(expr));
         }
 
+        if (tree.jjtGetNumChildren() > 1) {
+            if (log.isWarnEnabled()) {
+                log.warn( "The JEXL Expression created will be a reference"
+                    + " to the first expression from the supplied script: \""
+                    + expression + "\" " );
+            }
+        }
+
         // Must be a simple reference, expression, statement or if, otherwise
         // throw an exception.
         SimpleNode node = (SimpleNode) tree.jjtGetChild(0);



---------------------------------------------------------------------
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