commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hen...@apache.org
Subject svn commit: r1207941 [4/5] - in /commons/proper/jexl/trunk: ./ src/main/assembly/ src/main/config/ src/main/java/org/apache/commons/jexl3/ src/main/java/org/apache/commons/jexl3/internal/ src/main/java/org/apache/commons/jexl3/internal/introspection/ s...
Date Tue, 29 Nov 2011 16:19:43 GMT
Added: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/ParserVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/ParserVisitor.java?rev=1207941&view=auto
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/ParserVisitor.java (added)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/ParserVisitor.java Tue Nov 29 16:18:59 2011
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2011 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.jexl3.parser;
+
+/**
+ * Fully abstract to avoid public interface exposition.
+ */
+public abstract class ParserVisitor {
+    protected abstract Object visit(SimpleNode node, Object data);
+
+    protected abstract Object visit(ASTJexlScript node, Object data);
+
+    protected abstract Object visit(ASTBlock node, Object data);
+
+    protected abstract Object visit(ASTAmbiguous node, Object data);
+
+    protected abstract Object visit(ASTIfStatement node, Object data);
+
+    protected abstract Object visit(ASTWhileStatement node, Object data);
+
+    protected abstract Object visit(ASTForeachStatement node, Object data);
+
+    protected abstract Object visit(ASTReturnStatement node, Object data);
+
+    protected abstract Object visit(ASTAssignment node, Object data);
+
+    protected abstract Object visit(ASTVar node, Object data);
+
+    protected abstract Object visit(ASTReference node, Object data);
+
+    protected abstract Object visit(ASTTernaryNode node, Object data);
+
+    protected abstract Object visit(ASTOrNode node, Object data);
+
+    protected abstract Object visit(ASTAndNode node, Object data);
+
+    protected abstract Object visit(ASTBitwiseOrNode node, Object data);
+
+    protected abstract Object visit(ASTBitwiseXorNode node, Object data);
+
+    protected abstract Object visit(ASTBitwiseAndNode node, Object data);
+
+    protected abstract Object visit(ASTEQNode node, Object data);
+
+    protected abstract Object visit(ASTNENode node, Object data);
+
+    protected abstract Object visit(ASTLTNode node, Object data);
+
+    protected abstract Object visit(ASTGTNode node, Object data);
+
+    protected abstract Object visit(ASTLENode node, Object data);
+
+    protected abstract Object visit(ASTGENode node, Object data);
+
+    protected abstract Object visit(ASTERNode node, Object data);
+
+    protected abstract Object visit(ASTNRNode node, Object data);
+
+    protected abstract Object visit(ASTAdditiveNode node, Object data);
+
+    protected abstract Object visit(ASTAdditiveOperator node, Object data);
+
+    protected abstract Object visit(ASTMulNode node, Object data);
+
+    protected abstract Object visit(ASTDivNode node, Object data);
+
+    protected abstract Object visit(ASTModNode node, Object data);
+
+    protected abstract Object visit(ASTUnaryMinusNode node, Object data);
+
+    protected abstract Object visit(ASTBitwiseComplNode node, Object data);
+
+    protected abstract Object visit(ASTNotNode node, Object data);
+
+    protected abstract Object visit(ASTIdentifier node, Object data);
+
+    protected abstract Object visit(ASTNullLiteral node, Object data);
+
+    protected abstract Object visit(ASTTrueNode node, Object data);
+
+    protected abstract Object visit(ASTFalseNode node, Object data);
+
+    protected abstract Object visit(ASTNumberLiteral node, Object data);
+
+    protected abstract Object visit(ASTStringLiteral node, Object data);
+
+    protected abstract Object visit(ASTArrayLiteral node, Object data);
+
+    protected abstract Object visit(ASTMapLiteral node, Object data);
+
+    protected abstract Object visit(ASTMapEntry node, Object data);
+
+    protected abstract Object visit(ASTEmptyFunction node, Object data);
+
+    protected abstract Object visit(ASTSizeFunction node, Object data);
+
+    protected abstract Object visit(ASTFunctionNode node, Object data);
+
+    protected abstract Object visit(ASTMethodNode node, Object data);
+
+    protected abstract Object visit(ASTSizeMethod node, Object data);
+
+    protected abstract Object visit(ASTConstructorNode node, Object data);
+
+    protected abstract Object visit(ASTArrayAccess node, Object data);
+
+    protected abstract Object visit(ASTReferenceExpression node, Object data);
+}

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/ParserVisitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/SimpleNode.java (from r1206774, commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/SimpleNode.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/SimpleNode.java?p2=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/SimpleNode.java&p1=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/SimpleNode.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/SimpleNode.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/SimpleNode.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2.parser;
+package org.apache.commons.jexl3.parser;
 
 /**
  * A class originally generated by JJTree with the following JavaCCOptions:

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/SimpleNode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/SimpleNode.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/StringParser.java (from r1206774, commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/StringParser.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/StringParser.java?p2=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/StringParser.java&p1=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/StringParser.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/StringParser.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/StringParser.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2.parser;
+package org.apache.commons.jexl3.parser;
 
 /**
  * Common constant strings utilities.

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/StringParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/StringParser.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/StringParser.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/TokenMgrError.java (from r1206774, commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/TokenMgrError.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/TokenMgrError.java?p2=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/TokenMgrError.java&p1=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/TokenMgrError.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/TokenMgrError.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/TokenMgrError.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2.parser;
+package org.apache.commons.jexl3.parser;
 
 /**
  * Token Manager Error.
@@ -54,6 +54,7 @@ public class TokenMgrError extends Error
     /**
      * The lexer state.
      */
+    @SuppressWarnings("unused") // not read currently
     private int state;
     /**
      * The current character.

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/TokenMgrError.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/package.html (from r1206774, commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/package.html)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/package.html?p2=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/package.html&p1=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/package.html&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/package.html (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/package.html Tue Nov 29 16:18:59 2011
@@ -16,7 +16,7 @@
        limitations under the License.
     -->
     <head>
-        <title>Package Documentation for org.apache.commons.jexl2.parser Package</title>
+        <title>Package Documentation for org.apache.commons.jexl3.parser Package</title>
     </head>
     <body bgcolor="white">
         <p>

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/package.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/JexlScriptEngine.java (from r1206774, commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/scripting/JexlScriptEngine.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/JexlScriptEngine.java?p2=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/JexlScriptEngine.java&p1=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/scripting/JexlScriptEngine.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/scripting/JexlScriptEngine.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/JexlScriptEngine.java Tue Nov 29 16:18:59 2011
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.commons.jexl2.scripting;
+package org.apache.commons.jexl3.scripting;
 
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -32,9 +32,9 @@ import javax.script.ScriptEngineFactory;
 import javax.script.ScriptException;
 import javax.script.SimpleBindings;
 
-import org.apache.commons.jexl2.JexlContext;
-import org.apache.commons.jexl2.JexlEngine;
-import org.apache.commons.jexl2.Script;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.Script;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/JexlScriptEngine.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/JexlScriptEngine.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Copied: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/JexlScriptEngineFactory.java (from r1206774, commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/scripting/JexlScriptEngineFactory.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/JexlScriptEngineFactory.java?p2=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/JexlScriptEngineFactory.java&p1=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/scripting/JexlScriptEngineFactory.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/scripting/JexlScriptEngineFactory.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/JexlScriptEngineFactory.java Tue Nov 29 16:18:59 2011
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.commons.jexl2.scripting;
+package org.apache.commons.jexl3.scripting;
 
 import java.util.Arrays;
 import java.util.Collections;
@@ -23,16 +23,16 @@ import java.util.List;
 
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineFactory;
-import org.apache.commons.jexl2.JexlEngine;
-import org.apache.commons.jexl2.parser.StringParser;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.parser.StringParser;
 
 /**
  * Implements the Jexl ScriptEngineFactory for JSF-223.
  * <p>
  * Supports the following:<br.>
- * Language short names: "JEXL", "Jexl", "jexl", "JEXL2", "Jexl2", "jexl2" <br/>
- * File Extensions: ".jexl", ".jexl2"<br/>
- * "jexl2" etc. were added for engineVersion="2.0".
+ * Language short names: "JEXL", "Jexl", "jexl", "JEXL2", "Jexl2", "jexl2", "JEXL3", "Jexl3", "jexl3" <br/>
+ * File Extensions: ".jexl", ".jexl2", ".jexl3"<br/>
+ * "jexl3" etc. were added for engineVersion="3.0".
  * </p>
  * <p>
  * See
@@ -49,7 +49,7 @@ public class JexlScriptEngineFactory imp
 
     /** {@inheritDoc} */
     public String getEngineVersion() {
-        return "2.0"; // ensure this is updated if function changes are made to this class
+        return "3.0"; // ensure this is updated if function changes are made to this class
     }
 
     /** {@inheritDoc} */
@@ -59,7 +59,7 @@ public class JexlScriptEngineFactory imp
 
     /** {@inheritDoc} */
     public String getLanguageVersion() {
-        return "2.0"; // TODO this should be derived from the actual version
+        return "3.0"; // TODO this should be derived from the actual version
     }
 
     /** {@inheritDoc} */
@@ -83,17 +83,21 @@ public class JexlScriptEngineFactory imp
 
     /** {@inheritDoc} */
     public List<String> getExtensions() {
-        return Collections.unmodifiableList(Arrays.asList("jexl", "jexl2"));
+        return Collections.unmodifiableList(Arrays.asList("jexl", "jexl2", "jexl3"));
     }
 
     /** {@inheritDoc} */
     public List<String> getMimeTypes() {
-        return Collections.unmodifiableList(Arrays.asList("application/x-jexl", "application/x-jexl2"));
+        return Collections.unmodifiableList(Arrays.asList("application/x-jexl",
+                                                          "application/x-jexl2",
+                                                          "application/x-jexl3"));
     }
 
     /** {@inheritDoc} */
     public List<String> getNames() {
-        return Collections.unmodifiableList(Arrays.asList("JEXL", "Jexl", "jexl", "JEXL2", "Jexl2", "jexl2"));
+        return Collections.unmodifiableList(Arrays.asList("JEXL", "Jexl", "jexl",
+                                                          "JEXL2", "Jexl2", "jexl2",
+                                                          "JEXL3", "Jexl3", "jexl3"));
     }
 
     /** {@inheritDoc} */

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/JexlScriptEngineFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/JexlScriptEngineFactory.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Copied: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/Main.java (from r1206774, commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/scripting/Main.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/Main.java?p2=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/Main.java&p1=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/scripting/Main.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/scripting/Main.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/Main.java Tue Nov 29 16:18:59 2011
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.commons.jexl2.scripting;
+package org.apache.commons.jexl3.scripting;
 
 import java.io.BufferedReader;
 import java.io.FileReader;

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/Main.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/Main.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Copied: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/package.html (from r1206774, commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/scripting/package.html)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/package.html?p2=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/package.html&p1=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/scripting/package.html&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/scripting/package.html (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/package.html Tue Nov 29 16:18:59 2011
@@ -16,7 +16,7 @@
        limitations under the License.
     -->
     <head>
-        <title>Package Documentation for org.apache.commons.jexl2.scripting Package</title>
+        <title>Package Documentation for org.apache.commons.jexl3.scripting Package</title>
     </head>
     <body bgcolor="white">
         <p>

Propchange: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/scripting/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/jexl/trunk/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory?rev=1207941&r1=1207940&r2=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory (original)
+++ commons/proper/jexl/trunk/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory Tue Nov 29 16:18:59 2011
@@ -16,4 +16,4 @@
 #  
 # 
 
-org.apache.commons.jexl2.scripting.JexlScriptEngineFactory
+org.apache.commons.jexl3.scripting.JexlScriptEngineFactory

Modified: commons/proper/jexl/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/site/site.xml?rev=1207941&r1=1207940&r2=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/site/site.xml (original)
+++ commons/proper/jexl/trunk/src/site/site.xml Tue Nov 29 16:18:59 2011
@@ -25,7 +25,7 @@
     <body>
         <menu name="Commons&#xA0;Jexl">
             <item name="Overview"                href="index.html" />
-            <item name="2.1&#xA0;Javadoc"        href="apidocs/index.html"/>
+            <item name="3.0&#xA0;Javadoc"        href="apidocs/index.html"/>
             <item name="1.1&#xA0;Javadoc"        href="apidocs-1.1/index.html"/>
             <item name="Download"                href="download_jexl.cgi"/>
             <item name="Reference"               href="reference/index.html"/>

Modified: commons/proper/jexl/trunk/src/site/xdoc/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/site/xdoc/changes.xml?rev=1207941&r1=1207940&r2=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/site/xdoc/changes.xml (original)
+++ commons/proper/jexl/trunk/src/site/xdoc/changes.xml Tue Nov 29 16:18:59 2011
@@ -25,7 +25,10 @@
     <author email="dev@commons.apache.org">Commons Developers</author>
   </properties>
   <body>
-    <release version="2.1" date="unreleased">
+    <release version="3.0" date="unreleased">
+        <action dev="henrib" type="add" issue="JEXL-122">
+            Move JEXL from org.apache.comms.jexl2 to org.apache.commons.jexl3
+        </action>
         <action dev="henrib" type="add" issue="JEXL-121">
             Add simple template features
         </action>

Modified: commons/proper/jexl/trunk/src/site/xdoc/download_jexl.xml
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/site/xdoc/download_jexl.xml?rev=1207941&r1=1207940&r2=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/site/xdoc/download_jexl.xml (original)
+++ commons/proper/jexl/trunk/src/site/xdoc/download_jexl.xml Tue Nov 29 16:18:59 2011
@@ -95,32 +95,32 @@ limitations under the License.
       </p>
     </subsection>
     </section>
-    <section name="Commons JEXL 2.1 ">
+    <section name="Commons JEXL 3.0 ">
       <subsection name="Binaries">
         <table>
           <tr>
-              <td><a href="[preferred]/commons/jexl/binaries/commons-jexl-2.1-bin.tar.gz">commons-jexl-2.1-bin.tar.gz</a></td>
-              <td><a href="http://www.apache.org/dist/commons/jexl/binaries/commons-jexl-2.1-bin.tar.gz.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/jexl/binaries/commons-jexl-2.1-bin.tar.gz.asc">pgp</a></td>
+              <td><a href="[preferred]/commons/jexl/binaries/commons-jexl-3.0-bin.tar.gz">commons-jexl-3.0-bin.tar.gz</a></td>
+              <td><a href="http://www.apache.org/dist/commons/jexl/binaries/commons-jexl-3.0-bin.tar.gz.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/jexl/binaries/commons-jexl-3.0-bin.tar.gz.asc">pgp</a></td>
           </tr>
           <tr>
-              <td><a href="[preferred]/commons/jexl/binaries/commons-jexl-2.1-bin.zip">commons-jexl-2.1-bin.zip</a></td>
-              <td><a href="http://www.apache.org/dist/commons/jexl/binaries/commons-jexl-2.1-bin.zip.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/jexl/binaries/commons-jexl-2.1-bin.zip.asc">pgp</a></td>
+              <td><a href="[preferred]/commons/jexl/binaries/commons-jexl-3.0-bin.zip">commons-jexl-3.0-bin.zip</a></td>
+              <td><a href="http://www.apache.org/dist/commons/jexl/binaries/commons-jexl-3.0-bin.zip.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/jexl/binaries/commons-jexl-3.0-bin.zip.asc">pgp</a></td>
           </tr>
         </table>
       </subsection>
       <subsection name="Source">
         <table>
           <tr>
-              <td><a href="[preferred]/commons/jexl/source/commons-jexl-2.1-src.tar.gz">commons-jexl-2.1-src.tar.gz</a></td>
-              <td><a href="http://www.apache.org/dist/commons/jexl/source/commons-jexl-2.1-src.tar.gz.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/jexl/source/commons-jexl-2.1-src.tar.gz.asc">pgp</a></td>
+              <td><a href="[preferred]/commons/jexl/source/commons-jexl-3.0-src.tar.gz">commons-jexl-3.0-src.tar.gz</a></td>
+              <td><a href="http://www.apache.org/dist/commons/jexl/source/commons-jexl-3.0-src.tar.gz.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/jexl/source/commons-jexl-3.0-src.tar.gz.asc">pgp</a></td>
           </tr>
           <tr>
-              <td><a href="[preferred]/commons/jexl/source/commons-jexl-2.1-src.zip">commons-jexl-2.1-src.zip</a></td>
-              <td><a href="http://www.apache.org/dist/commons/jexl/source/commons-jexl-2.1-src.zip.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/jexl/source/commons-jexl-2.1-src.zip.asc">pgp</a></td>
+              <td><a href="[preferred]/commons/jexl/source/commons-jexl-3.0-src.zip">commons-jexl-3.0-src.zip</a></td>
+              <td><a href="http://www.apache.org/dist/commons/jexl/source/commons-jexl-3.0-src.zip.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/jexl/source/commons-jexl-3.0-src.zip.asc">pgp</a></td>
           </tr>
         </table>
       </subsection>

Modified: commons/proper/jexl/trunk/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/site/xdoc/index.xml?rev=1207941&r1=1207940&r2=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/site/xdoc/index.xml (original)
+++ commons/proper/jexl/trunk/src/site/xdoc/index.xml Tue Nov 29 16:18:59 2011
@@ -36,7 +36,7 @@ working with enterprise platforms.
             </p>
             <p>
             The library exposes a small footprint API
-            - the <a href="apidocs/org/apache/commons/jexl2/package-summary.html#usage">core features</a> fit in
+            - the <a href="apidocs/org/apache/commons/jexl3/package-summary.html#usage">core features</a> fit in
             3 classes and 10 methods - that can be used in various conditions:
                 <ul>
                     <li>Scripting features:
@@ -97,13 +97,13 @@ working with enterprise platforms.
         <section name="A Brief Example">
             <p>
             When evaluating expressions, JEXL merges an
-                <a href="apidocs/org/apache/commons/jexl2/Expression.html">Expression</a>
+                <a href="apidocs/org/apache/commons/jexl3/Expression.html">Expression</a>
             with a
-                <a href="apidocs/org/apache/commons/jexl2/JexlContext.html">JexlContext</a>.
+                <a href="apidocs/org/apache/commons/jexl3/JexlContext.html">JexlContext</a>.
             An Expression is created using
-                <a href="apidocs/org/apache/commons/jexl2/JexlEngine.html#createExpression(java.lang.String)">JexlEngine#createExpression()</a>,
+                <a href="apidocs/org/apache/commons/jexl3/JexlEngine.html#createExpression(java.lang.String)">JexlEngine#createExpression()</a>,
             passing a String containing valid JEXL syntax.  A simple JexlContext can be created by instantiating a
-                <a href="apidocs/org/apache/commons/jexl2/MapContext.html">MapContext</a>;
+                <a href="apidocs/org/apache/commons/jexl3/MapContext.html">MapContext</a>;
             a map of variables that will be internally wrapped can be optionally provided through its constructor.
             The following example, takes a variable named foo, and invokes the bar() method on the property innerFoo:
             </p>

Modified: commons/proper/jexl/trunk/src/site/xdoc/reference/examples.xml
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/site/xdoc/reference/examples.xml?rev=1207941&r1=1207940&r2=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/site/xdoc/reference/examples.xml (original)
+++ commons/proper/jexl/trunk/src/site/xdoc/reference/examples.xml Tue Nov 29 16:18:59 2011
@@ -34,18 +34,18 @@
       <p>
         You can find two sample programs in JEXL's CVS repository:
         <ul>
-          <li><a href="http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/examples/ArrayTest.java?view=markup">Using arrays</a></li>
-          <li><a href="http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/examples/MethodPropertyTest.java?view=markup">Accessing Properties and invoking methods</a></li>
+          <li><a href="http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/examples/ArrayTest.java?view=markup">Using arrays</a></li>
+          <li><a href="http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/examples/MethodPropertyTest.java?view=markup">Accessing Properties and invoking methods</a></li>
         </ul>
       </p>
       <p>
-        As well, <a href="http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl2/JexlTest.java?view=markup">JEXL's Unit Tests</a>
+        As well, <a href="http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl3/JexlTest.java?view=markup">JEXL's Unit Tests</a>
         provide handy examples of expressions. The test code also contains a
-        <a href="http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl2/Jexl.java?view=markup">simple class</a>
+        <a href="http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl3/Jexl.java?view=markup">simple class</a>
         that evaluates its command line arguments as JEXL expressions when run.
       </p>
       <p>
-          The <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl2/package-summary.html#intro">
+          The <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl3/package-summary.html#intro">
           package javadoc</a> also contains useful information.
       </p>
     </section>
@@ -53,9 +53,9 @@
       <p>
         To evaluate expressions using JEXL, you need three things:
         <ul>
-          <li>An <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl2/JexlEngine.html">engine</a> to create expressions,</li>
-          <li>A <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl2/JexlContext.html">context</a> containing any variables, and</li>
-          <li>An <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl2/Expression.html">expression</a></li>
+          <li>An <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl3/JexlEngine.html">engine</a> to create expressions,</li>
+          <li>A <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl3/JexlContext.html">context</a> containing any variables, and</li>
+          <li>An <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl3/Expression.html">expression</a></li>
         </ul>
       </p>
       <p>
@@ -72,18 +72,18 @@
       </p>
       <p>
         The easiest way of obtaining a a context is to use the
-        <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl2/MapContext.html#MapContext()">new MapContext()</a>
+        <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl3/MapContext.html#MapContext()">new MapContext()</a>
         statement. This creates a context implemented using an underlying
         <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html">HashMap</a>
       </p>
       <p>
-        <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl2/Expression.html">Expressions</a> are
-        created using the <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl2/JexlEngine.html#createExpression(java.lang.String)">JexlEngine.createExpression(String)</a>
+        <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl3/Expression.html">Expressions</a> are
+        created using the <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl3/JexlEngine.html#createExpression(java.lang.String)">JexlEngine.createExpression(String)</a>
         method. 
       </p>
       <p>
         Once you have your expression, you can then use use the
-        <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl2/Expression.html#evaluate(org.apache.commons.jexl2.JexlContext)">evaluate</a>
+        <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl3/Expression.html#evaluate(org.apache.commons.jexl3.JexlContext)">evaluate</a>
         to execute it and obtain a result.
       </p>
       <p>
@@ -112,12 +112,12 @@
         Often you have the objects and values that are needed in the context available
         elsewhere. If those are already in a Map, instead of creating the default context and populating it
         manually in the code, you can wrap a MapContext around your own map using
-        <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl2/MapContext.html#MapContext()">new MapContext(yourOwnMap)</a>
+        <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl3/MapContext.html#MapContext()">new MapContext(yourOwnMap)</a>
       </p>
       <p>
         In edge cases, it may be simpler to create a context implementation of your
         own.
-        The <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl2/JexlContext.html">JexlContext</a>
+        The <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl3/JexlContext.html">JexlContext</a>
         interface is very simple with only three methods, to set, get and check the existence of variables.
       </p>
     </section>
@@ -137,7 +137,7 @@ x * 1.1 + y
         <p>Arithmetic expressions can use variables. <code>null</code> can be treated as a zero for arithmetic;
         if you need stricter semantics and consider <code>null</code> as an erroneous operand for arithmetic and
         comparisons operations, you should initialize your JEXL engine using
-        <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl2/JexlEngine.html#setLenient(boolean)">JexlEngine.setLenient(false)</a>.
+        <a href="http://commons.apache.org/jexl/apidocs/org/apache/commons/jexl3/JexlEngine.html#setLenient(boolean)">JexlEngine.setLenient(false)</a>.
         </p>
       </subsection>
       <subsection name="Calling methods">

Modified: commons/proper/jexl/trunk/src/site/xdoc/reference/jsr223.xml
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/site/xdoc/reference/jsr223.xml?rev=1207941&r1=1207940&r2=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/site/xdoc/reference/jsr223.xml (original)
+++ commons/proper/jexl/trunk/src/site/xdoc/reference/jsr223.xml Tue Nov 29 16:18:59 2011
@@ -54,7 +54,8 @@
         <p>
         The binary release includes a command-line application which can be used to exercise the JSR-223 script engine.
         For example:
-        <source>java -cp commons-jexl-2.0.1.jar;commons-logging-1.1.1.jar[;bsf-api-3.0.jar] org.apache.commons.jexl2.scripting.Main script.jexl</source>
+        <source>java -cp commons-jexl-2.0.1.jar;commons-logging-1.1.1.jar[;bsf-api-3.0.jar]
+            org.apache.commons.jexl3.scripting.Main script.jexl</source>
         If a single argument is provided, then that is assumed to be the name of a script file;
         otherwise, the application prompts for script input to be evaluated.
         In both cases, the variable "args" contains the command-line arguments.
@@ -77,8 +78,8 @@
       <p>
         The classes used to support JSR-223 scripting access are:
         <ul>
-        <li>org.apache.commons.jexl2.scripting.JexlScriptEngineFactory - the factory</li>
-        <li>org.apache.commons.jexl2.scripting.JexlScriptEngine - the engine</li>
+        <li>org.apache.commons.jexl3.scripting.JexlScriptEngineFactory - the factory</li>
+        <li>org.apache.commons.jexl3.scripting.JexlScriptEngine - the engine</li>
         <li>org.apache.commons.jexl2.scripting.JexlScriptObject - class used to give scripts access to JEXL objects</li>
         </ul>
       </p>

Modified: commons/proper/jexl/trunk/src/site/xdoc/reference/syntax.xml
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/site/xdoc/reference/syntax.xml?rev=1207941&r1=1207940&r2=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/site/xdoc/reference/syntax.xml (original)
+++ commons/proper/jexl/trunk/src/site/xdoc/reference/syntax.xml Tue Nov 29 16:18:59 2011
@@ -36,7 +36,7 @@
       <p>
         For more technical information about the JEXL Grammar, you can find the
         <a href="https://javacc.dev.java.net/">JavaCC</a> grammar for JEXL
-        here: <a href="http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/parser/Parser.jjt?view=markup">Parser.jjt</a>
+        here: <a href="http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/parser/Parser.jjt?view=markup">Parser.jjt</a>
       </p>
     </section>
     <section name="Language Elements">

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArithmeticTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArithmeticTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArithmeticTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArithmeticTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArithmeticTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArithmeticTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArithmeticTest.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
 
 import java.util.Map;
 import java.math.BigDecimal;
@@ -25,7 +25,7 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import org.apache.commons.jexl2.junit.Asserter;
+import org.apache.commons.jexl3.junit.Asserter;
 
 public class ArithmeticTest extends JexlTestCase {
     private Asserter asserter;

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArithmeticTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArrayAccessTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArrayAccessTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArrayAccessTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArrayAccessTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArrayAccessTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArrayAccessTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArrayAccessTest.java Tue Nov 29 16:18:59 2011
@@ -14,14 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.jexl2.junit.Asserter;
+import org.apache.commons.jexl3.junit.Asserter;
+import org.apache.commons.jexl3.junit.Asserter;
 
 
 /**

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArrayAccessTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArrayLiteralTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArrayLiteralTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArrayLiteralTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArrayLiteralTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArrayLiteralTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArrayLiteralTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArrayLiteralTest.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
 
 import java.util.Arrays;
 

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArrayLiteralTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ArrayLiteralTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/AssignTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/AssignTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/AssignTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/AssignTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/AssignTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/AssignTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/AssignTest.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
 
 /**
  * Test cases for assignment.

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/AssignTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/BitwiseOperatorTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/BitwiseOperatorTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/BitwiseOperatorTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/BitwiseOperatorTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/BitwiseOperatorTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/BitwiseOperatorTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/BitwiseOperatorTest.java Tue Nov 29 16:18:59 2011
@@ -15,8 +15,9 @@
  * limitations under the License.
  */
 
-package org.apache.commons.jexl2;
-import org.apache.commons.jexl2.junit.Asserter;
+package org.apache.commons.jexl3;
+import org.apache.commons.jexl3.junit.Asserter;
+import org.apache.commons.jexl3.junit.Asserter;
 
 /**
  * Tests for the bitwise operators.

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/BitwiseOperatorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/BitwiseOperatorTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/BlockTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/BlockTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/BlockTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/BlockTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/BlockTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/BlockTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/BlockTest.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
+
+import org.apache.commons.jexl3.Expression;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.MapContext;
 
 /**
  * Tests for blocks

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/BlockTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/BlockTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/CacheTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/CacheTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/CacheTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/CacheTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/CacheTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/CacheTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/CacheTest.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
 
 import java.util.List;
 import java.util.Map;

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/CacheTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/CacheTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ClassCreator.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ClassCreator.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ClassCreator.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ClassCreator.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ClassCreator.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ClassCreator.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ClassCreator.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
+
+import org.apache.commons.jexl3.JexlEngine;
 
 import java.io.File;
 import java.io.FileWriter;
@@ -68,17 +70,17 @@ public class ClassCreator {
         seed = s;
         className = "foo" + s;
         sourceName = className + ".java";
-        packageDir = new File(base, seed + "/org/apache/commons/jexl2/generated");
+        packageDir = new File(base, seed + "/org/apache/commons/jexl3/generated");
         packageDir.mkdirs();
         loader = null;
     }
 
     public String getClassName() {
-        return "org.apache.commons.jexl2.generated." + className;
+        return "org.apache.commons.jexl3.generated." + className;
     }
 
     public Class<?> getClassInstance() throws Exception {
-        return getClassLoader().loadClass("org.apache.commons.jexl2.generated." + className);
+        return getClassLoader().loadClass("org.apache.commons.jexl3.generated." + className);
     }
 
     public ClassLoader getClassLoader() throws Exception {
@@ -105,7 +107,7 @@ public class ClassCreator {
 
     void generate() throws Exception {
         FileWriter aWriter = new FileWriter(new File(packageDir, sourceName), false);
-        aWriter.write("package org.apache.commons.jexl2.generated;");
+        aWriter.write("package org.apache.commons.jexl3.generated;");
         aWriter.write("public class " + className + "{\n");
         aWriter.write("private int value =");
         aWriter.write(Integer.toString(seed));
@@ -129,7 +131,7 @@ public class ClassCreator {
         }
         Integer r = (Integer) jexl.invokeMethod(javac, "compile", source);
         if (r.intValue() >= 0) {
-            return getClassLoader().loadClass("org.apache.commons.jexl2.generated." + className);
+            return getClassLoader().loadClass("org.apache.commons.jexl3.generated." + className);
         }
         return null;
     }

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ClassCreator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ClassCreatorTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ClassCreatorTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ClassCreatorTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ClassCreatorTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ClassCreatorTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ClassCreatorTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ClassCreatorTest.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
 
 import java.io.File;
 import java.lang.ref.Reference;
@@ -23,6 +23,11 @@ import java.lang.ref.SoftReference;
 import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 import java.util.List;
+
+import org.apache.commons.jexl3.Expression;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.MapContext;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ClassCreatorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/Foo.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/Foo.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/Foo.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/Foo.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/Foo.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/Foo.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/Foo.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
 
 import java.util.ArrayList;
 import java.util.Iterator;

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/Foo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/Foo.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ForEachTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ForEachTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ForEachTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ForEachTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ForEachTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ForEachTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ForEachTest.java Tue Nov 29 16:18:59 2011
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
 
 import java.util.ArrayList;
 import java.util.Arrays;

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ForEachTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/ForEachTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/IfTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IfTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/IfTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/IfTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IfTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IfTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/IfTest.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
+
+import org.apache.commons.jexl3.Expression;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.MapContext;
 
 /**
  * Test cases for the if statement.

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/IfTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/IfTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/IssuesTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/IssuesTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/IssuesTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/IssuesTest.java Tue Nov 29 16:18:59 2011
@@ -14,16 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
 
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.math.MathContext;
-import org.apache.commons.jexl2.introspection.Uberspect;
-import org.apache.commons.jexl2.internal.Introspector;
+import org.apache.commons.jexl3.internal.Introspector;
 import java.util.HashMap;
 import java.util.Map;
-import org.apache.commons.jexl2.introspection.UberspectImpl;
+import org.apache.commons.jexl3.introspection.Uberspect;
 
 /**
  * Test cases for reported issues
@@ -224,7 +223,7 @@ public class IssuesTest extends JexlTest
         }
         assertTrue("should have foo & goo", found == 2);
 
-        names = ((UberspectImpl) uber).getFieldNames(Another.class);
+        names = ((org.apache.commons.jexl3.internal.introspection.Uberspect) uber).getFieldNames(Another.class);
         assertTrue("should find fields", names.length > 0);
         found = 0;
         for (String name : names) {
@@ -721,7 +720,7 @@ public class IssuesTest extends JexlTest
         assertEquals("456", result);
         
         Debugger dbg = new Debugger();
-        dbg.debug(((ExpressionImpl) s).script);
+        dbg.debug(((JexlScript) s).script);
         String dbgdata = dbg.data();
         assertEquals("foo.'q u u x';", dbgdata);
     }

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/IssuesTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/IssuesTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/Jexl.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/Jexl.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/Jexl.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/Jexl.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/Jexl.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/Jexl.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/Jexl.java Tue Nov 29 16:18:59 2011
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
 
 import java.util.Map;
 

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/Jexl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/Jexl.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/JexlTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/JexlTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/JexlTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/JexlTest.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
 
 import java.io.StringReader;
 import java.math.BigDecimal;
@@ -30,29 +30,26 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.jexl2.parser.Parser;
+import org.apache.commons.jexl3.parser.Parser;
 
 /**
  *  Simple testcases
  *
  *  @since 1.0
  */
-public class JexlTest extends JexlTestCase
-{
+public class JexlTest extends JexlTestCase {
     protected static final String METHOD_STRING = "Method string";
     protected static final String GET_METHOD_STRING = "GetMethod string";
 
-    public JexlTest(String testName)
-    {
+    public JexlTest(String testName) {
         super(testName);
     }
 
     /**
-      *  test a simple property expression
-      */
+     *  test a simple property expression
+     */
     public void testProperty()
-         throws Exception
-    {
+            throws Exception {
         /*
          *  tests a simple property expression
          */
@@ -60,7 +57,7 @@ public class JexlTest extends JexlTestCa
         Expression e = JEXL.createExpression("foo.bar");
         JexlContext jc = new MapContext();
 
-        jc.set("foo", new Foo() );
+        jc.set("foo", new Foo());
         Object o = e.evaluate(jc);
 
         assertTrue("o not instanceof String", o instanceof String);
@@ -68,10 +65,9 @@ public class JexlTest extends JexlTestCa
     }
 
     public void testBoolean()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
-        jc.set("foo", new Foo() );
+        jc.set("foo", new Foo());
         jc.set("a", Boolean.TRUE);
         jc.set("b", Boolean.FALSE);
 
@@ -84,21 +80,19 @@ public class JexlTest extends JexlTestCa
     }
 
     public void testStringLit()
-         throws Exception
-    {
+            throws Exception {
         /*
          *  tests a simple property expression
          */
         JexlContext jc = new MapContext();
-        jc.set("foo", new Foo() );
+        jc.set("foo", new Foo());
         assertExpression(jc, "foo.get(\"woogie\")", "Repeat : woogie");
     }
 
     public void testExpression()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
-        jc.set("foo", new Foo() );
+        jc.set("foo", new Foo());
         jc.set("a", Boolean.TRUE);
         jc.set("b", Boolean.FALSE);
         jc.set("num", new Integer(5));
@@ -112,7 +106,7 @@ public class JexlTest extends JexlTestCa
         assertExpression(jc, "a==true", Boolean.TRUE);
         assertExpression(jc, "a==false", Boolean.FALSE);
         assertExpression(jc, "true==false", Boolean.FALSE);
-        
+
         assertExpression(jc, "2 < 3", Boolean.TRUE);
         assertExpression(jc, "num < 5", Boolean.FALSE);
         assertExpression(jc, "num < num", Boolean.FALSE);
@@ -156,8 +150,7 @@ public class JexlTest extends JexlTestCa
     }
 
     public void testEmpty()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
         jc.set("string", "");
         jc.set("array", new Object[0]);
@@ -180,8 +173,7 @@ public class JexlTest extends JexlTestCa
     }
 
     public void testSize()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
         jc.set("s", "five!");
         jc.set("array", new Object[5]);
@@ -210,9 +202,9 @@ public class JexlTest extends JexlTestCa
         Set<String> set = new HashSet<String>();
         set.addAll(list);
         set.add("1");
-        
+
         jc.set("set", set);
-        
+
         // support generic int size() method
         BitSet bitset = new BitSet(5);
         jc.set("bitset", bitset);
@@ -233,8 +225,7 @@ public class JexlTest extends JexlTestCa
         assertExpression(jc, "list.get(list.size() - 1)", "5");
     }
 
-    public void testSizeAsProperty() throws Exception
-    {
+    public void testSizeAsProperty() throws Exception {
         JexlContext jc = new MapContext();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("size", "cheese");
@@ -250,12 +241,12 @@ public class JexlTest extends JexlTestCa
     }
 
     /**
-      *  test the new function e.g constructor invocation
-      */
+     *  test the new function e.g constructor invocation
+     */
     public void testNew() throws Exception {
         JexlContext jc = new MapContext();
         jc.set("double", Double.class);
-        jc.set("foo", "org.apache.commons.jexl2.Foo");
+        jc.set("foo", "org.apache.commons.jexl3.Foo");
         Expression expr;
         Object value;
         expr = JEXL.createExpression("new(double, 1)");
@@ -270,39 +261,37 @@ public class JexlTest extends JexlTestCa
     }
 
     /**
-      *  test some simple mathematical calculations
-      */
+     *  test some simple mathematical calculations
+     */
     public void testCalculations()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
 
         /*
          * test to ensure new string cat works
          */
-        jc.set("stringy", "thingy" );
+        jc.set("stringy", "thingy");
         assertExpression(jc, "stringy + 2", "thingy2");
 
         /*
          * test new null coersion
          */
-        jc.set("imanull", null );
+        jc.set("imanull", null);
         assertExpression(jc, "imanull + 2", new Integer(2));
         assertExpression(jc, "imanull + imanull", new Integer(0));
-        
+
         /* test for bugzilla 31577 */
         jc.set("n", new Integer(0));
         assertExpression(jc, "n != null && n != 0", Boolean.FALSE);
     }
 
     /**
-      *  test some simple conditions
-      */
+     *  test some simple conditions
+     */
     public void testConditions()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
-        jc.set("foo", new Integer(2) );
+        jc.set("foo", new Integer(2));
         jc.set("aFloat", new Float(1));
         jc.set("aDouble", new Double(2));
         jc.set("aChar", new Character('A'));
@@ -313,7 +302,7 @@ public class JexlTest extends JexlTestCa
         jc.set("aBuffer", buffer);
         jc.set("aList", list);
         jc.set("bList", list2);
-        
+
         assertExpression(jc, "foo == 2", Boolean.TRUE);
         assertExpression(jc, "2 == 3", Boolean.FALSE);
         assertExpression(jc, "3 == foo", Boolean.FALSE);
@@ -343,17 +332,16 @@ public class JexlTest extends JexlTestCa
     }
 
     /**
-      *  test some simple conditions
-      */
+     *  test some simple conditions
+     */
     public void testNotConditions()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
 
         Foo foo = new Foo();
-        jc.set("x", Boolean.TRUE );
-        jc.set("foo", foo );
-        jc.set("bar", "true" );
+        jc.set("x", Boolean.TRUE);
+        jc.set("foo", foo);
+        jc.set("bar", "true");
 
         assertExpression(jc, "!x", Boolean.FALSE);
         assertExpression(jc, "x", Boolean.TRUE);
@@ -375,17 +363,15 @@ public class JexlTest extends JexlTestCa
 
     }
 
-
     /**
-      *  test some simple conditions
-      */
+     *  test some simple conditions
+     */
     public void testNotConditionsWithDots()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
 
-        jc.set("x.a", Boolean.TRUE );
-        jc.set("x.b", Boolean.FALSE );
+        jc.set("x.a", Boolean.TRUE);
+        jc.set("x.b", Boolean.FALSE);
 
         assertExpression(jc, "x.a", Boolean.TRUE);
         assertExpression(jc, "!x.a", Boolean.FALSE);
@@ -393,13 +379,12 @@ public class JexlTest extends JexlTestCa
     }
 
     /**
-      *  test some simple conditions
-      */
+     *  test some simple conditions
+     */
     public void testComparisons()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
-        jc.set("foo", "the quick and lazy fox" );
+        jc.set("foo", "the quick and lazy fox");
 
         assertExpression(jc, "foo.indexOf('quick') > 0", Boolean.TRUE);
         assertExpression(jc, "foo.indexOf('bar') >= 0", Boolean.FALSE);
@@ -407,13 +392,12 @@ public class JexlTest extends JexlTestCa
     }
 
     /**
-      *  test some null conditions
-      */
+     *  test some null conditions
+     */
     public void testNull()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
-        jc.set("bar", new Integer(2) );
+        jc.set("bar", new Integer(2));
 
         assertExpression(jc, "empty foo", Boolean.TRUE);
         assertExpression(jc, "bar == null", Boolean.FALSE);
@@ -432,15 +416,14 @@ public class JexlTest extends JexlTestCa
         assertExpression(jc, "'\"Hello\"'", "\"Hello\"");
         assertExpression(jc, "\"I'm testing\"", "I'm testing");
     }
-    
+
     /**
-      *  test some blank strings
-      */
+     *  test some blank strings
+     */
     public void testBlankStrings()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
-        jc.set("bar", "" );
+        jc.set("bar", "");
 
         assertExpression(jc, "foo == ''", Boolean.FALSE);
         assertExpression(jc, "bar == ''", Boolean.TRUE);
@@ -451,14 +434,13 @@ public class JexlTest extends JexlTestCa
     }
 
     /**
-      *  test some blank strings
-      */
+     *  test some blank strings
+     */
     public void testLogicExpressions()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
-        jc.set("foo", "abc" );
-        jc.set("bar", "def" );
+        jc.set("foo", "abc");
+        jc.set("bar", "def");
 
         assertExpression(jc, "foo == 'abc' || bar == 'abc'", Boolean.TRUE);
         assertExpression(jc, "foo == 'abc' or bar == 'abc'", Boolean.TRUE);
@@ -471,53 +453,48 @@ public class JexlTest extends JexlTestCa
         assertExpression(jc, "foo == 'abc' and bar == 'def'", Boolean.TRUE);
     }
 
-
     /**
-      *  test variables with underscore names
-      */
+     *  test variables with underscore names
+     */
     public void testVariableNames()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
-        jc.set("foo_bar", "123" );
-        
+        jc.set("foo_bar", "123");
+
         assertExpression(jc, "foo_bar", "123");
     }
 
     /**
-      *  test the use of dot notation to lookup map entries
-      */
+     *  test the use of dot notation to lookup map entries
+     */
     public void testMapDot()
-         throws Exception
-    {
+            throws Exception {
         Map<String, String> foo = new HashMap<String, String>();
-        foo.put( "bar", "123" );
+        foo.put("bar", "123");
 
         JexlContext jc = new MapContext();
-        jc.set("foo", foo );
-        
+        jc.set("foo", foo);
+
         assertExpression(jc, "foo.bar", "123");
-    }  
+    }
 
     /**
      *  Tests string literals
      */
     public void testStringLiterals()
-        throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
-        jc.set("foo", "bar" );
+        jc.set("foo", "bar");
 
         assertExpression(jc, "foo == \"bar\"", Boolean.TRUE);
         assertExpression(jc, "foo == 'bar'", Boolean.TRUE);
     }
 
     /**
-      *  test the use of an int based property
-      */
+     *  test the use of an int based property
+     */
     public void testIntProperty()
-         throws Exception
-    {
+            throws Exception {
         Foo foo = new Foo();
 
         // lets check the square function first..
@@ -525,7 +502,7 @@ public class JexlTest extends JexlTestCa
         assertEquals(4, foo.square(-2));
 
         JexlContext jc = new MapContext();
-        jc.set("foo", foo );
+        jc.set("foo", foo);
 
         assertExpression(jc, "foo.count", new Integer(5));
         assertExpression(jc, "foo.square(2)", new Integer(4));
@@ -533,14 +510,13 @@ public class JexlTest extends JexlTestCa
     }
 
     /**
-      *  test the -1 comparison bug
-      */
+     *  test the -1 comparison bug
+     */
     public void testNegativeIntComparison()
-         throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
         Foo foo = new Foo();
-        jc.set("foo", foo );
+        jc.set("foo", foo);
 
         assertExpression(jc, "foo.count != -1", Boolean.TRUE);
         assertExpression(jc, "foo.count == 5", Boolean.TRUE);
@@ -551,8 +527,7 @@ public class JexlTest extends JexlTestCa
      * Attempts to recreate bug http://jira.werken.com/ViewIssue.jspa?key=JELLY-8
      */
     public void testCharAtBug()
-        throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
 
         jc.set("foo", "abcdef");
@@ -563,29 +538,26 @@ public class JexlTest extends JexlTestCa
 
     }
 
-    public void testEmptyDottedVariableName() throws Exception
-    {
+    public void testEmptyDottedVariableName() throws Exception {
         JexlContext jc = new MapContext();
 
-        jc.set( "this.is.a.test", "");
+        jc.set("this.is.a.test", "");
 
         assertExpression(jc, "empty(this.is.a.test)", Boolean.TRUE);
     }
 
-    public void testEmptySubListOfMap() throws Exception
-    {
+    public void testEmptySubListOfMap() throws Exception {
         JexlContext jc = new MapContext();
         Map<String, ArrayList<?>> m = new HashMap<String, ArrayList<?>>();
         m.put("aList", new ArrayList<Object>());
 
-        jc.set( "aMap", m );
+        jc.set("aMap", m);
 
-        assertExpression( jc, "empty( aMap.aList )", Boolean.TRUE );
+        assertExpression(jc, "empty( aMap.aList )", Boolean.TRUE);
     }
 
     public void testCoercionWithComparisionOperators()
-        throws Exception
-    {
+            throws Exception {
         JexlContext jc = new MapContext();
 
         assertExpression(jc, "'2' > 1", Boolean.TRUE);
@@ -607,8 +579,7 @@ public class JexlTest extends JexlTestCa
      * Test that 'and' only evaluates the second item if needed
      * @throws Exception if there are errors
      */
-    public void testBooleanShortCircuitAnd() throws Exception
-    {
+    public void testBooleanShortCircuitAnd() throws Exception {
         // handle false for the left arg of 'and'
         Foo tester = new Foo();
         JexlContext jc = new MapContext();
@@ -624,13 +595,12 @@ public class JexlTest extends JexlTestCa
         expr.evaluate(jc);
         assertTrue("Short circuit failure: rhs not evaluated when lhs TRUE", tester.getModified());
     }
-    
+
     /**
      * Test that 'or' only evaluates the second item if needed
      * @throws Exception if there are errors
      */
-    public void testBooleanShortCircuitOr() throws Exception
-    {
+    public void testBooleanShortCircuitOr() throws Exception {
         // handle false for the left arg of 'or'
         Foo tester = new Foo();
         JexlContext jc = new MapContext();
@@ -651,8 +621,7 @@ public class JexlTest extends JexlTestCa
      * Simple test of '+' as a string concatenation operator
      * @throws Exception
      */
-    public void testStringConcatenation() throws Exception
-    {
+    public void testStringConcatenation() throws Exception {
         JexlContext jc = new MapContext();
         jc.set("first", "Hello");
         jc.set("second", "World");
@@ -664,20 +633,16 @@ public class JexlTest extends JexlTestCa
         Expression expr = JEXL.createExpression(code);
         assertEquals("Bad expression value", code, expr.toString());
     }
-    
+
     /**
      * Make sure bad syntax throws ParseException
      * @throws Exception on errors
      */
-    public void testBadParse() throws Exception
-    {
-        try
-        {
+    public void testBadParse() throws Exception {
+        try {
             assertExpression(new MapContext(), "empty()", null);
             fail("Bad expression didn't throw ParseException");
-        }
-        catch (JexlException pe)
-        {
+        } catch (JexlException pe) {
             // expected behaviour
         }
     }
@@ -686,24 +651,22 @@ public class JexlTest extends JexlTestCa
      * Test the ## comment in a string
      * @throws Exception
      */
-    public void testComment() throws Exception
-    {
+    public void testComment() throws Exception {
         assertExpression(new MapContext(), "## double or nothing\n 1 + 1", Integer.valueOf("2"));
     }
-    
+
     /**
      * Test assignment.
      * @throws Exception
      */
-    public void testAssignment() throws Exception
-    {
+    public void testAssignment() throws Exception {
         JexlContext jc = new MapContext();
         jc.set("aString", "Hello");
         Foo foo = new Foo();
         jc.set("foo", foo);
         Parser parser = new Parser(new StringReader(";"));
         parser.parse(new StringReader("aString = 'World';"), null);
-        
+
         assertExpression(jc, "hello = 'world'", "world");
         assertEquals("hello variable not changed", "world", jc.get("hello"));
         assertExpression(jc, "result = 1 + 1", new Integer(2));
@@ -712,9 +675,8 @@ public class JexlTest extends JexlTestCa
         // assertExpression(jc, "foo.property1 = '99'", "99");
         // assertEquals("property not set", "99", foo.getProperty1());
     }
-    
-    public void testAntPropertiesWithMethods() throws Exception
-    {
+
+    public void testAntPropertiesWithMethods() throws Exception {
         JexlContext jc = new MapContext();
         String value = "Stinky Cheese";
         jc.set("maven.bob.food", value);
@@ -729,8 +691,7 @@ public class JexlTest extends JexlTestCa
 //        assertExpression(jc, "commons-logging", version);
     }
 
-    public void testUnicodeSupport() throws Exception
-    {
+    public void testUnicodeSupport() throws Exception {
         JexlContext jc = new MapContext();
         assertExpression(jc, "myvar == 'Użytkownik'", Boolean.FALSE);
         assertExpression(jc, "'c:\\some\\windows\\path'", "c:\\some\\windows\\path");
@@ -741,25 +702,31 @@ public class JexlTest extends JexlTestCa
 
     public static final class Duck {
         int user = 10;
+
         @SuppressWarnings("boxing")
         public Integer get(String val) {
-            if ("zero".equals(val))
+            if ("zero".equals(val)) {
                 return 0;
-            if ("one".equals(val))
+            }
+            if ("one".equals(val)) {
                 return 1;
-            if ("user".equals(val))
+            }
+            if ("user".equals(val)) {
                 return user;
+            }
             return -1;
         }
+
         @SuppressWarnings("boxing")
         public void set(String val, Object value) {
             if ("user".equals(val)) {
-                if ("zero".equals(value))
+                if ("zero".equals(value)) {
                     user = 0;
-                else if ("one".equals(value))
+                } else if ("one".equals(value)) {
                     user = 1;
-                else
-                    user = value instanceof Integer? (Integer) value : -1;
+                } else {
+                    user = value instanceof Integer ? (Integer) value : -1;
+                }
             }
         }
     }
@@ -792,7 +759,7 @@ public class JexlTest extends JexlTestCa
 
     @SuppressWarnings("boxing")
     public void testArray() throws Exception {
-        int[] array = { 100, 101 , 102 };
+        int[] array = {100, 101, 102};
         JexlEngine jexl = JEXL;
         JexlContext jc = new MapContext();
         jc.set("array", array);
@@ -813,11 +780,9 @@ public class JexlTest extends JexlTestCa
      * Asserts that the given expression returns the given value when applied to the
      * given context
      */
-    protected void assertExpression(JexlContext jc, String expression, Object expected) throws Exception
-    {
+    protected void assertExpression(JexlContext jc, String expression, Object expected) throws Exception {
         Expression e = JEXL.createExpression(expression);
         Object actual = e.evaluate(jc);
         assertEquals(expression, expected, actual);
     }
-
 }
\ No newline at end of file

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/JexlTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/JexlTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/JexlTestCase.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTestCase.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/JexlTestCase.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/JexlTestCase.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTestCase.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTestCase.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/JexlTestCase.java Tue Nov 29 16:18:59 2011
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.commons.jexl2; 
+package org.apache.commons.jexl3;
 
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
@@ -24,10 +24,10 @@ import java.util.Map;
 import java.util.List;
 import java.util.ArrayList;
 
-import org.apache.commons.jexl2.parser.JexlNode;
-import org.apache.commons.jexl2.parser.ASTJexlScript;
+import org.apache.commons.jexl3.parser.ASTJexlScript;
 
 import junit.framework.TestCase;
+import org.apache.commons.jexl3.parser.JexlNode;
 
 /**
  * Implements runTest methods to dynamically instantiate and invoke a test,
@@ -98,7 +98,7 @@ public class JexlTestCase extends TestCa
             // recreate expr from string
             Script exprdbg = jdbg.createScript(expressiondbg);
             // make arg cause become the root cause
-            JexlNode root = ((ExpressionImpl) exprdbg).script;
+            JexlNode root = ((JexlScript) exprdbg).script;
             while (root.jjtGetParent() != null) {
                 root = root.jjtGetParent();
             }
@@ -240,7 +240,7 @@ public class JexlTestCase extends TestCa
      * @throws Exception
      */
     public static void runTest(String tname, String mname) throws Exception {
-        String testClassName = "org.apache.commons.jexl2."+tname;
+        String testClassName = "org.apache.commons.jexl3."+tname;
         Class<JexlTestCase> clazz = null;
         JexlTestCase test = null;
         // find the class

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/JexlTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/JexlTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/MapLiteralTest.java (from r1206774, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/MapLiteralTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/MapLiteralTest.java?p2=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/MapLiteralTest.java&p1=commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/MapLiteralTest.java&r1=1206774&r2=1207941&rev=1207941&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/MapLiteralTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/MapLiteralTest.java Tue Nov 29 16:18:59 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.jexl2;
+package org.apache.commons.jexl3;
 
 import java.util.Collections;
 import java.util.HashMap;

Propchange: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl3/MapLiteralTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message