You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by he...@apache.org on 2021/06/03 15:41:43 UTC

[commons-jexl] tag 2.1 created (now 1976010)

This is an automated email from the ASF dual-hosted git repository.

henrib pushed a change to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git.


      at 1976010  (commit)
This tag includes the following new commits:

     new 7b95da4  creating 2.0 branch before switching to 3.0
     new feeffea  Partial JEXL-83 fix rollback, deprecated setLenient and associated field in JexlArithmetic in an attempt to release 2.1
     new 91e2db1  Tweaks
     new f48a764  Add missing @since markers
     new 828454d  There does not seem to be any reason for these fields to be protected rather than private. Can always increase access later; much more difficult to decrease access.
     new 1cb1ca5  No need for cancelled and parameters to be non-private
     new 765d4bf  JUnit => 4.10 Findbugs => 2.3.2 Checkstyle => 2.7
     new b163c4d  Restore some binary compatibility
     new a9cd7ec  Binary compatibiliry
     new bb1ad4c  Binary compatibilty fixes
     new f174c9a  Restore binary compatibility
     new f6f5881  Document compatibilty
     new 00ddc62  Create test jar
     new 40d62a0  Remove temporary work-rounds
     new 27b2da8  Fix SVN location
     new c974ac7  Now RC2
     new d797d47  Update year
     new 61d0cb4  Update Findbugs ignore list
     new 1976010  Tag 2.1 RC3

The 19 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[commons-jexl] 11/19: Restore binary compatibility

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit f174c9afe5d871e1cee27c5fb59ab89581061edf
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Sun Dec 4 17:44:12 2011 +0000

    Restore binary compatibility
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1210155 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/commons/jexl2/JexlEngine.java | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/commons/jexl2/JexlEngine.java b/src/main/java/org/apache/commons/jexl2/JexlEngine.java
index 2ee9699..248726e 100644
--- a/src/main/java/org/apache/commons/jexl2/JexlEngine.java
+++ b/src/main/java/org/apache/commons/jexl2/JexlEngine.java
@@ -1225,7 +1225,7 @@ public class JexlEngine {
     protected ASTJexlScript parse(CharSequence expression, JexlInfo info, Scope frame) {
         String expr = cleanExpression(expression);
         ASTJexlScript script = null;
-        DebugInfo dbgInfo = null;
+        JexlInfo dbgInfo = null;
         synchronized (parser) {
             if (cache != null) {
                 script = cache.get(expr);
@@ -1241,8 +1241,6 @@ public class JexlEngine {
                 // use first calling method of JexlEngine as debug info
                 if (info == null) {
                     dbgInfo = debugInfo();
-                } else if (info instanceof DebugInfo) {
-                    dbgInfo = (DebugInfo) info;
                 } else {
                     dbgInfo = info.debugInfo();
                 }
@@ -1274,7 +1272,7 @@ public class JexlEngine {
      * @param c column number
      * @return a JexlInfo instance
      */
-    protected DebugInfo createInfo(String fn, int l, int c) {
+    protected JexlInfo createInfo(String fn, int l, int c) {
         return new DebugInfo(fn, l, c);
     }
 
@@ -1284,7 +1282,7 @@ public class JexlEngine {
      * not owned by JexlEngine, UnifiedJEXL or {Script,Expression}Factory.</p>
      * @return an Info if debug is set, null otherwise
      */
-    protected DebugInfo debugInfo() {
+    protected JexlInfo debugInfo() {
         DebugInfo info = null;
         if (debug) {
             Throwable xinfo = new Throwable();
@@ -1307,7 +1305,7 @@ public class JexlEngine {
                 }
             }
             if (se != null) {
-                info = createInfo(se.getClassName() + "." + se.getMethodName(), se.getLineNumber(), 0);
+                info = createInfo(se.getClassName() + "." + se.getMethodName(), se.getLineNumber(), 0).debugInfo();
             }
         }
         return info;

[commons-jexl] 15/19: Fix SVN location

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit 27b2da894bb8f9da329d5476ae90307066050a5a
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Thu Dec 8 01:36:27 2011 +0000

    Fix SVN location
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1211731 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 9fb4a76..dfa050e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,9 +36,9 @@
     </issueManagement>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/jexl/trunk</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/jexl/trunk</developerConnection>
-        <url>http://svn.apache.org/viewvc/commons/proper/jexl/trunk</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/jexl/branches/2.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/jexl/branches/2.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0</url>
     </scm>
 
     <distributionManagement>

[commons-jexl] 13/19: Create test jar

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit 00ddc62deaa2e7c00b63c99aa4293ea6267be165
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Thu Dec 8 01:07:55 2011 +0000

    Create test jar
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1211727 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/pom.xml b/pom.xml
index ebcb243..91d5c87 100644
--- a/pom.xml
+++ b/pom.xml
@@ -201,6 +201,17 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-jar-plugin</artifactId>
+              <executions>
+                <execution>
+                  <goals>
+                    <goal>test-jar</goal>
+                  </goals>
+                </execution>
+              </executions>
+            </plugin>
         </plugins>
     </build>
 

[commons-jexl] 07/19: JUnit => 4.10 Findbugs => 2.3.2 Checkstyle => 2.7

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit 765d4bfb434f90acea9dd80969dbe8e1c4006575
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Thu Dec 1 13:50:29 2011 +0000

    JUnit => 4.10
    Findbugs => 2.3.2
    Checkstyle => 2.7
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1209079 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index fddd658..ebcb243 100644
--- a/pom.xml
+++ b/pom.xml
@@ -107,7 +107,7 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>3.8.2</version>
+            <version>4.10</version>
             <scope>test</scope>
         </dependency>
         <!-- For JSR-223 API -->
@@ -227,7 +227,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
-                <version>2.5</version>
+                <version>2.7</version>
                 <configuration>
                     <configLocation>${basedir}/src/main/config/checkstyle.xml</configLocation>
                     <excludes>org/apache/commons/jexl2/parser/*.java</excludes>
@@ -255,7 +255,7 @@
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>findbugs-maven-plugin</artifactId>
-                <version>2.3.1</version>
+                <version>2.3.2</version>
                 <configuration>
                     <excludeFilterFile>${basedir}/src/main/config/findbugs-exclude-filter.xml</excludeFilterFile>
                     <xmlOutput>true</xmlOutput>

[commons-jexl] 18/19: Update Findbugs ignore list

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit 61d0cb4141500275cc007c6dc449f83ef68f1df6
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Thu Dec 8 14:03:13 2011 +0000

    Update Findbugs ignore list
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1211891 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/config/findbugs-exclude-filter.xml | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/main/config/findbugs-exclude-filter.xml b/src/main/config/findbugs-exclude-filter.xml
index ca14658..5e434c8 100644
--- a/src/main/config/findbugs-exclude-filter.xml
+++ b/src/main/config/findbugs-exclude-filter.xml
@@ -16,11 +16,8 @@
    limitations under the License.
 -->
 
-<!--
-  This file removes JavaCC generated classes from being analyzed by findbugs.
-  Having no way to influence their generation, instructing findbugs to ignore them reduces clutter.
--->
 <FindBugsFilter>
+    <!-- Ignore JavaCC generated classes -->
     <Match>
         <Class name="org.apache.commons.jexl2.parser.ParseException"/>
     </Match>
@@ -39,4 +36,16 @@
     <Match>
         <Class name="org.apache.commons.jexl2.parser.TokenMgrError"/>
     </Match>
+    <!-- Ignore deliberately unused field -->
+    <Match>
+        <Class name="org.apache.commons.jexl2.Interpreter"/>
+        <Field name="parameters"/>
+    </Match>
+    <!-- Deprecated and unused, included for binary compat only -->
+    <Match>
+        <Class name="org.apache.commons.jexl2.parser.ASTFloatLiteral"/>
+    </Match>
+    <Match>
+        <Class name="org.apache.commons.jexl2.parser.ASTIntegerLiteral"/>
+    </Match>
 </FindBugsFilter>

[commons-jexl] 16/19: Now RC2

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit c974ac744a8f13ce9b09fb545244f8aff5f40d8f
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Thu Dec 8 01:36:53 2011 +0000

    Now RC2
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1211732 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index dfa050e..0cb432f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -125,7 +125,7 @@
         <commons.componentid>jexl</commons.componentid>
         <commons.release.version>2.1</commons.release.version>
         <!-- The RC version used in the staging repository URL. -->
-        <commons.rc.version>RC1</commons.rc.version>
+        <commons.rc.version>RC2</commons.rc.version>
         <commons.release.2.version>1.1</commons.release.2.version>
         <commons.release.2.binary.suffix />
         <commons.jira.id>JEXL</commons.jira.id>

[commons-jexl] 05/19: There does not seem to be any reason for these fields to be protected rather than private. Can always increase access later; much more difficult to decrease access.

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit 828454d885012ce0bf445d21be9a0dbed373a19d
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Thu Dec 1 12:33:02 2011 +0000

    There does not seem to be any reason for these fields to be protected rather than private.
    Can always increase access later; much more difficult to decrease access.
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1209050 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/commons/jexl2/JexlEngine.java            | 8 ++++----
 src/main/java/org/apache/commons/jexl2/introspection/Sandbox.java | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/commons/jexl2/JexlEngine.java b/src/main/java/org/apache/commons/jexl2/JexlEngine.java
index 6f523dc..bcbd460 100644
--- a/src/main/java/org/apache/commons/jexl2/JexlEngine.java
+++ b/src/main/java/org/apache/commons/jexl2/JexlEngine.java
@@ -996,13 +996,13 @@ public class JexlEngine {
         /**
          * The number of parameters.
          */
-        protected final int parms;
+        private final int parms;
         /**
          * The map of named registers aka script parameters.
          * Each parameter is associated to a register and is materialized as an offset in the registers array used
          * during evaluation.
          */
-        protected Map<String, Integer> namedRegisters = null;
+        private Map<String, Integer> namedRegisters = null;
 
         /**
          * Creates a new scope with a list of parameters.
@@ -1154,9 +1154,9 @@ public class JexlEngine {
      */
     public static final class Frame {
         /** Registers or arguments. */
-        protected Object[] registers = null;
+        private Object[] registers = null;
         /** Parameter and argument names if any. */
-        protected String[] parameters = null;
+        private String[] parameters = null;
         
         /**
          * Creates a new frame.
diff --git a/src/main/java/org/apache/commons/jexl2/introspection/Sandbox.java b/src/main/java/org/apache/commons/jexl2/introspection/Sandbox.java
index 5013a05..36c0411 100644
--- a/src/main/java/org/apache/commons/jexl2/introspection/Sandbox.java
+++ b/src/main/java/org/apache/commons/jexl2/introspection/Sandbox.java
@@ -197,7 +197,7 @@ public final class Sandbox {
      */
     public static final class WhiteSet extends Names {
         /** The map of controlled names and aliases. */
-        protected Map<String, String> names = null;
+        private Map<String, String> names = null;
 
         @Override
         public boolean add(String name) {
@@ -230,7 +230,7 @@ public final class Sandbox {
      */
     public static final class BlackSet extends Names {
         /** The set of controlled names. */
-        protected Set<String> names = null;
+        private Set<String> names = null;
 
         @Override
         public boolean add(String name) {

[commons-jexl] 14/19: Remove temporary work-rounds

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit 40d62a0f227e85386f100580cbcc1024e72853e0
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Thu Dec 8 01:35:37 2011 +0000

    Remove temporary work-rounds
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1211730 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/pom.xml b/pom.xml
index 91d5c87..9fb4a76 100644
--- a/pom.xml
+++ b/pom.xml
@@ -130,39 +130,14 @@
         <commons.release.2.binary.suffix />
         <commons.jira.id>JEXL</commons.jira.id>
         <commons.jira.pid>12310479</commons.jira.pid>
-        <!-- Temp fix until parent POM is updated -->
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     </properties>
 
     <build>
-        <!-- temporarily override the parent POM (v 11) until that is updated -->
-        <resources>
-            <resource>
-                <directory>${basedir}</directory>
-                <targetPath>META-INF</targetPath>
-                <includes>
-                    <include>NOTICE.txt</include>
-                    <include>LICENSE.txt</include>
-                </includes>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-        </resources>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
             </plugin>
-            <!-- workaround MRELEASE-424 when publishing -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-release-plugin</artifactId>
-                <configuration>
-                    <mavenExecutorId>forked-path</mavenExecutorId>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>

[commons-jexl] 06/19: No need for cancelled and parameters to be non-private

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit 1cb1ca57702c44fd9d738ace25ac976cd67bb09d
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Thu Dec 1 13:45:11 2011 +0000

    No need for cancelled and parameters to be non-private
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1209075 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/commons/jexl2/Interpreter.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/jexl2/Interpreter.java b/src/main/java/org/apache/commons/jexl2/Interpreter.java
index 5cf475b..da0cfd4 100644
--- a/src/main/java/org/apache/commons/jexl2/Interpreter.java
+++ b/src/main/java/org/apache/commons/jexl2/Interpreter.java
@@ -113,14 +113,19 @@ public class Interpreter implements ParserVisitor {
     protected Object[] registers = null;
     /**
      * Parameter names if any.
+     * Intended for use in debugging; not currently used externally.
      * @since 2.1 
      */
-    protected String[] parameters = null;
+    @SuppressWarnings("unused")
+    private String[] parameters = null;
+
     /** 
      * Cancellation support.
+     * @see #isCancelled()
      * @since 2.1
      */
-    protected volatile boolean cancelled = false;
+    private volatile boolean cancelled = false;
+
     /** Empty parameters for method matching. */
     protected static final Object[] EMPTY_PARAMS = new Object[0];
 

[commons-jexl] 04/19: Add missing @since markers

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit f48a7645d1c426bc7f5e24639ae8d9390227e7d3
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Thu Dec 1 12:24:25 2011 +0000

    Add missing @since markers
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1209049 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/commons/jexl2/DebugInfo.java   |  4 +++-
 .../org/apache/commons/jexl2/ExpressionImpl.java   |  6 +++++
 .../java/org/apache/commons/jexl2/Interpreter.java | 27 ++++++++++++++++++----
 .../org/apache/commons/jexl2/JexlArithmetic.java   | 19 ++++++++++++---
 .../java/org/apache/commons/jexl2/JexlEngine.java  | 12 ++++++++++
 .../org/apache/commons/jexl2/JexlException.java    |  2 ++
 .../java/org/apache/commons/jexl2/JexlInfo.java    |  1 +
 .../java/org/apache/commons/jexl2/UnifiedJEXL.java |  4 ++++
 .../commons/jexl2/introspection/UberspectImpl.java |  3 +++
 9 files changed, 70 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/apache/commons/jexl2/DebugInfo.java b/src/main/java/org/apache/commons/jexl2/DebugInfo.java
index 40298ff..f85319d 100644
--- a/src/main/java/org/apache/commons/jexl2/DebugInfo.java
+++ b/src/main/java/org/apache/commons/jexl2/DebugInfo.java
@@ -63,7 +63,9 @@ public class DebugInfo implements JexlInfo {
         return toString();
     }
     
-    /** {@inheritDoc} */
+    /** {@inheritDoc} 
+     * @since 2.1 
+     */
     public DebugInfo debugInfo() {
         return this;
     }
diff --git a/src/main/java/org/apache/commons/jexl2/ExpressionImpl.java b/src/main/java/org/apache/commons/jexl2/ExpressionImpl.java
index 99ae30b..f07ade3 100644
--- a/src/main/java/org/apache/commons/jexl2/ExpressionImpl.java
+++ b/src/main/java/org/apache/commons/jexl2/ExpressionImpl.java
@@ -109,6 +109,7 @@ public class ExpressionImpl implements Expression, Script {
 
     /**
      * {@inheritDoc}
+     * @since 2.1
      */
     public Object execute(JexlContext context, Object... args) {
         Interpreter interpreter = jexl.createInterpreter(context);
@@ -118,6 +119,7 @@ public class ExpressionImpl implements Expression, Script {
 
     /**
      * {@inheritDoc}
+     * @since 2.1
      */
     public String[] getParameters() {
         return script.getParameters();
@@ -125,6 +127,7 @@ public class ExpressionImpl implements Expression, Script {
 
     /**
      * {@inheritDoc}
+     * @since 2.1
      */
     public String[] getLocalVariables() {
         return script.getLocalVariables();
@@ -132,6 +135,7 @@ public class ExpressionImpl implements Expression, Script {
 
     /**
      * {@inheritDoc}
+     * @since 2.1
      */
     public Set<List<String>> getVariables() {
         return jexl.getVariables(this);
@@ -139,6 +143,7 @@ public class ExpressionImpl implements Expression, Script {
 
     /**
      * {@inheritDoc}
+     * @since 2.1
      */
     public Callable<Object> callable(JexlContext context) {
         return callable(context, (Object[]) null);
@@ -146,6 +151,7 @@ public class ExpressionImpl implements Expression, Script {
 
     /**
      * {@inheritDoc}
+     * @since 2.1
      */
     public Callable<Object> callable(JexlContext context, Object... args) {
         final Interpreter interpreter = jexl.createInterpreter(context);
diff --git a/src/main/java/org/apache/commons/jexl2/Interpreter.java b/src/main/java/org/apache/commons/jexl2/Interpreter.java
index 7dadd52..5cf475b 100644
--- a/src/main/java/org/apache/commons/jexl2/Interpreter.java
+++ b/src/main/java/org/apache/commons/jexl2/Interpreter.java
@@ -111,9 +111,15 @@ public class Interpreter implements ParserVisitor {
     protected final boolean cache;
     /** Registers or arguments. */
     protected Object[] registers = null;
-    /** Parameter names if any. */
+    /**
+     * Parameter names if any.
+     * @since 2.1 
+     */
     protected String[] parameters = null;
-    /** Cancellation support. */
+    /** 
+     * Cancellation support.
+     * @since 2.1
+     */
     protected volatile boolean cancelled = false;
     /** Empty parameters for method matching. */
     protected static final Object[] EMPTY_PARAMS = new Object[0];
@@ -135,6 +141,7 @@ public class Interpreter implements ParserVisitor {
      * @param aContext the context to evaluate expression
      * @param strictFlag whether this interpreter runs in strict mode
      * @param silentFlag whether this interpreter runs in silent mode
+     * @since 2.1
      */
     public Interpreter(JexlEngine jexl, JexlContext aContext, boolean strictFlag, boolean silentFlag) {
         this.logger = jexl.logger;
@@ -151,6 +158,7 @@ public class Interpreter implements ParserVisitor {
     /**
      * Copy constructor.
      * @param base the base to copy
+     * @since 2.1
      */
     protected Interpreter(Interpreter base) {
         this.logger = base.logger;
@@ -168,7 +176,9 @@ public class Interpreter implements ParserVisitor {
      * Sets whether this interpreter considers unknown variables, methods and constructors as errors.
      * @param flag true for strict, false for lenient
      * @deprecated Do not use; will be removed in a later version
+     * @since 2.1 
      */
+    // TODO why add a method and then deprecate it?
     @Deprecated
     public void setStrict(boolean flag) {
         this.strict = flag;
@@ -187,6 +197,7 @@ public class Interpreter implements ParserVisitor {
     /**
      * Checks whether this interpreter considers unknown variables, methods and constructors as errors.
      * @return true if strict, false otherwise
+     * @since 2.1
      */
     public boolean isStrict() {
         return this.strict;
@@ -231,6 +242,7 @@ public class Interpreter implements ParserVisitor {
     /**
      * Gets the context.
      * @return the {@link JexlContext} used for evaluation.
+     * @since 2.1
      */
     protected JexlContext getContext() {
         return context;
@@ -264,6 +276,7 @@ public class Interpreter implements ParserVisitor {
     /**
      * Sets this interpreter parameters and arguments.
      * @param frame the calling frame
+     * @since 2.1
      */
     protected void setFrame(JexlEngine.Frame frame) {
         if (frame != null) {
@@ -1311,13 +1324,19 @@ public class Interpreter implements ParserVisitor {
         return result;
     }
 
-    /** {@inheritDoc} */
+    /** 
+     * {@inheritDoc}
+     * @since 2.1 
+     */
     public Object visit(ASTReferenceExpression node, Object data) {
         ASTArrayAccess upper = node;
         return visit(upper, data);
     }
 
-    /** {@inheritDoc} */
+    /** 
+     * {@inheritDoc}
+     * @since 2.1 
+     */
     public Object visit(ASTReturnStatement node, Object data) {
         Object val = node.jjtGetChild(0).jjtAccept(this, data);
         throw new JexlException.Return(node, null, val);
diff --git a/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java b/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
index 8c831c8..ef821a9 100644
--- a/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
+++ b/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
@@ -52,14 +52,23 @@ public class JexlArithmetic {
     protected static final BigInteger BIGI_LONG_MAX_VALUE = BigInteger.valueOf(Long.MAX_VALUE);
     /** Long.MIN_VALUE as BigInteger. */
     protected static final BigInteger BIGI_LONG_MIN_VALUE = BigInteger.valueOf(Long.MIN_VALUE);
-    /** Default BigDecimal scale. */
+    /** 
+     * Default BigDecimal scale. 
+     * @since 2.1 
+     */
     protected static final int BIGD_SCALE = -1;
     /** Whether this JexlArithmetic instance behaves in strict or lenient mode. */
     /** @deprecated : will become final in next version. */
     protected boolean strict;
-    /** The big decimal math context. */
+    /** 
+     * The big decimal math context.
+     * @since 2.1 
+     */
     protected final MathContext mathContext;
-    /** The big decimal scale. */
+    /** 
+     * The big decimal scale.
+     * @since 2.1
+     */
     protected final int mathScale;
 
     /**
@@ -254,6 +263,7 @@ public class JexlArithmetic {
      * @param rhs the right hand side operand that lead to the bigd result
      * @param bigd the BigDecimal to narrow
      * @return an Integer or Long if narrowing is possible, the original BigInteger otherwise
+     * @since 2.1
      */
     protected Number narrowBigDecimal(Object lhs, Object rhs, BigDecimal bigd) {
         if (isNumberable(lhs) || isNumberable(rhs)) {
@@ -556,6 +566,7 @@ public class JexlArithmetic {
      * Negates a value (unary minus for numbers).
      * @param val the value to negate
      * @return the negated value
+     * @since 2.1
      */
     public Object negate(Object val) {
         if (val instanceof Integer) {
@@ -1053,6 +1064,7 @@ public class JexlArithmetic {
      * @param narrow the target narrow class
      * @param source the orginal source class
      * @return true if attempt to narrow source to target is accepted
+     * @since 2.1
      */
     protected boolean narrowAccept(Class<?> narrow, Class<?> source) {
         return narrow == null || narrow.equals(source);
@@ -1063,6 +1075,7 @@ public class JexlArithmetic {
      * @param original the original number
      * @param narrow the attempted target class
      * @return  the narrowed number or the source if no narrowing was possible
+     * @since 2.1
      */
     protected Number narrowNumber(Number original, Class<?> narrow) {
         if (original == null) {
diff --git a/src/main/java/org/apache/commons/jexl2/JexlEngine.java b/src/main/java/org/apache/commons/jexl2/JexlEngine.java
index 8e2020b..6f523dc 100644
--- a/src/main/java/org/apache/commons/jexl2/JexlEngine.java
+++ b/src/main/java/org/apache/commons/jexl2/JexlEngine.java
@@ -231,6 +231,7 @@ public class JexlEngine {
     /**
      * Gets this engine underlying arithmetic.
      * @return the arithmetic
+     * @since 2.1
      */
     public JexlArithmetic getArithmetic() {
         return arithmetic;
@@ -311,6 +312,7 @@ public class JexlEngine {
      * Sets whether this engine behaves in strict or lenient mode.
      * Equivalent to setLenient(!flag).
      * @param flag true for strict, false for lenient
+     * @since 2.1
      */
     public final void setStrict(boolean flag) {
         setLenient(!flag);
@@ -320,6 +322,7 @@ public class JexlEngine {
      * Checks whether this engine behaves in strict or lenient mode.
      * Equivalent to !isLenient().
      * @return true for strict, false for lenient
+     * @since 2.1
      */
     public final boolean isStrict() {
         return !isLenient();
@@ -475,6 +478,7 @@ public class JexlEngine {
      * @param names the script parameter names
      * @return A {@link Script} which can be executed using a {@link JexlContext}.
      * @throws JexlException if there is a problem parsing the script.
+     * @since 2.1
      */
     public Script createScript(String scriptText, JexlInfo info, String[] names) {
         if (scriptText == null) {
@@ -766,6 +770,7 @@ public class JexlEngine {
      * @param strictFlag whether the interpreter runs in strict mode
      * @param silentFlag whether the interpreter runs in silent mode
      * @return an Interpreter
+     * @since 2.1
      */
     protected Interpreter createInterpreter(JexlContext context, boolean strictFlag, boolean silentFlag) {
         return new Interpreter(this, context == null ? EMPTY_CONTEXT : context, strictFlag, silentFlag);
@@ -866,6 +871,7 @@ public class JexlEngine {
 
     /**
      * Clears the expression cache.
+     * @since 2.1
      */
     public void clearCache() {
         synchronized (parser) {
@@ -880,6 +886,7 @@ public class JexlEngine {
      * @param script the script
      * @return the set of variables, each as a list of strings (ant-ish variables use more than 1 string)
      *         or the empty set if no variables are used
+     * @since 2.1
      */
     public Set<List<String>> getVariables(Script script) {
         if (script instanceof ExpressionImpl) {
@@ -896,6 +903,7 @@ public class JexlEngine {
      * @param node the node
      * @param refs the set of variable being filled
      * @param ref the current variable being filled
+     * @since 2.1
      */
     protected void getVariables(JexlNode node, Set<List<String>> refs, List<String> ref) {
         boolean array = node instanceof ASTArrayAccess;
@@ -956,6 +964,7 @@ public class JexlEngine {
      * Gets the array of parameters from a script.
      * @param script the script
      * @return the parameters which may be empty (but not null) if no parameters were defined
+     * @since 2.1
      */
     protected String[] getParameters(Script script) {
         if (script instanceof ExpressionImpl) {
@@ -969,6 +978,7 @@ public class JexlEngine {
      * Gets the array of local variable from a script.
      * @param script the script
      * @return the local variables array which may be empty (but not null) if no local variables were defined
+     * @since 2.1
      */
     protected String[] getLocalVariables(Script script) {
         if (script instanceof ExpressionImpl) {
@@ -980,6 +990,7 @@ public class JexlEngine {
 
     /**
      * A script scope, stores the declaration of parameters and local variables.
+     * @since 2.1
      */
     public static final class Scope {
         /**
@@ -1139,6 +1150,7 @@ public class JexlEngine {
 
     /**
      * A call frame, created from a scope, stores the arguments and local variables as "registers".
+     * @since 2.1
      */
     public static final class Frame {
         /** Registers or arguments. */
diff --git a/src/main/java/org/apache/commons/jexl2/JexlException.java b/src/main/java/org/apache/commons/jexl2/JexlException.java
index 83bb092..27259a6 100644
--- a/src/main/java/org/apache/commons/jexl2/JexlException.java
+++ b/src/main/java/org/apache/commons/jexl2/JexlException.java
@@ -103,6 +103,7 @@ public class JexlException extends RuntimeException {
     /**
      * Accesses detailed message.
      * @return  the message
+     * @since 2.1
      */
     protected String detailedMessage() {
         return super.getMessage();
@@ -113,6 +114,7 @@ public class JexlException extends RuntimeException {
      * @param prefix the prefix to the message
      * @param expr the expression in error
      * @return the formatted message
+     * @since 2.1
      */
     protected String parserError(String prefix, String expr) {
         int begin = info.debugInfo().getColumn();
diff --git a/src/main/java/org/apache/commons/jexl2/JexlInfo.java b/src/main/java/org/apache/commons/jexl2/JexlInfo.java
index bcbcf4a..5338e92 100644
--- a/src/main/java/org/apache/commons/jexl2/JexlInfo.java
+++ b/src/main/java/org/apache/commons/jexl2/JexlInfo.java
@@ -29,6 +29,7 @@ public interface JexlInfo {
     /**
      * Gets the underlying debugging information.
      * @return a debug info instance
+     * @since 2.1
      */
     DebugInfo debugInfo();
 }
diff --git a/src/main/java/org/apache/commons/jexl2/UnifiedJEXL.java b/src/main/java/org/apache/commons/jexl2/UnifiedJEXL.java
index f40c470..af2d0b2 100644
--- a/src/main/java/org/apache/commons/jexl2/UnifiedJEXL.java
+++ b/src/main/java/org/apache/commons/jexl2/UnifiedJEXL.java
@@ -211,6 +211,7 @@ public final class UnifiedJEXL {
 
     /**
      * Clears the cache.
+     * @since 2.1
      */
     public void clearCache() {
         synchronized (cache) {
@@ -312,6 +313,7 @@ public final class UnifiedJEXL {
          * are written in 'dot' or 'bracketed' notation. (a.b is equivalent to a['b']).</p>
          * @return the set of variables, each as a list of strings (ant-ish variables use more than 1 string)
          *         or the empty set if no variables are used
+         * @since 2.1
          */
         public Set<List<String>> getVariables() {
             return Collections.emptySet();
@@ -320,6 +322,7 @@ public final class UnifiedJEXL {
         /**
          * Fills up the list of variables accessed by this expression.
          * @param refs the set of variable being filled
+         * @since 2.1
          */
         protected void getVariables(Set<List<String>> refs) {
             // nothing to do
@@ -1337,6 +1340,7 @@ public final class UnifiedJEXL {
      * @param sequence the sequence
      * @param pattern the pattern to match at start of sequence
      * @return the first position after end of pattern if it matches, -1 otherwise
+     * @since 2.1
      */
     protected int startsWith(CharSequence sequence, CharSequence pattern) {
         int s = 0;
diff --git a/src/main/java/org/apache/commons/jexl2/introspection/UberspectImpl.java b/src/main/java/org/apache/commons/jexl2/introspection/UberspectImpl.java
index 09d5e63..e67ced5 100644
--- a/src/main/java/org/apache/commons/jexl2/introspection/UberspectImpl.java
+++ b/src/main/java/org/apache/commons/jexl2/introspection/UberspectImpl.java
@@ -61,6 +61,7 @@ public class UberspectImpl extends Introspector implements Uberspect {
     /**
      * Resets this Uberspect class loader.
      * @param cloader the class loader to use
+     * @since 2.1
      */
     public void setLoader(ClassLoader cloader) {
         base().setLoader(cloader);
@@ -117,6 +118,7 @@ public class UberspectImpl extends Introspector implements Uberspect {
     
     /**
      * {@inheritDoc}
+     * @since 2.1
      */
     public JexlMethod getConstructorMethod(Object ctorHandle, Object[] args, JexlInfo info) {
         final Constructor<?> ctor = getConstructor(ctorHandle, args);
@@ -180,6 +182,7 @@ public class UberspectImpl extends Introspector implements Uberspect {
      * @param object the object
      * @param name the container name
      * @return a JexlPropertyGet is successfull, null otherwise
+     * @since 2.1
      */
     protected JexlPropertyGet getIndexedGet(Object object, String name) {
         if (object != null && name != null) {

[commons-jexl] 08/19: Restore some binary compatibility

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit b163c4dc667ba529821fedc1633c0cdd846fbfd2
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Fri Dec 2 22:01:19 2011 +0000

    Restore some binary compatibility
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1209719 13f79535-47bb-0310-9956-ffa450edef68
---
 .../commons/jexl2/parser/ASTFloatLiteral.java      | 48 ++++++++++++++++++++++
 .../commons/jexl2/parser/ASTIntegerLiteral.java    | 48 ++++++++++++++++++++++
 2 files changed, 96 insertions(+)

diff --git a/src/main/java/org/apache/commons/jexl2/parser/ASTFloatLiteral.java b/src/main/java/org/apache/commons/jexl2/parser/ASTFloatLiteral.java
new file mode 100644
index 0000000..1961857
--- /dev/null
+++ b/src/main/java/org/apache/commons/jexl2/parser/ASTFloatLiteral.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jexl2.parser;
+
+/**
+ * @deprecated Only for use in maintaining binary compatibility - should not actually be used - will be removed in 3.0
+ */
+@Deprecated
+public final class ASTFloatLiteral extends JexlNode implements JexlNode.Literal<Float> {
+    /** The type literal value. */
+    Float literal = null;
+
+    public ASTFloatLiteral(int id) {
+        super(id);
+    }
+
+    public ASTFloatLiteral(Parser p, int id) {
+        super(p, id);
+    }
+    
+    /**
+     * Gets the literal value.
+     * @return the float literal
+     */
+    public Float getLiteral() {
+        return literal;
+    }
+    
+    /** {@inheritDoc} */
+    @Override
+    public Object jjtAccept(ParserVisitor visitor, Object data) {
+        return visitor.visit(this, data);
+    }
+}
diff --git a/src/main/java/org/apache/commons/jexl2/parser/ASTIntegerLiteral.java b/src/main/java/org/apache/commons/jexl2/parser/ASTIntegerLiteral.java
new file mode 100644
index 0000000..bf2f23b
--- /dev/null
+++ b/src/main/java/org/apache/commons/jexl2/parser/ASTIntegerLiteral.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jexl2.parser;
+
+/**
+ * @deprecated Only for use in maintaining binary compatibility - should not actually be used - will be removed in 3.0
+ */
+@Deprecated
+public final class ASTIntegerLiteral extends JexlNode implements JexlNode.Literal<Integer> {
+    /** The type literal value. */
+    Integer literal = null;
+
+    ASTIntegerLiteral(int id) {
+        super(id);
+    }
+
+    ASTIntegerLiteral(Parser p, int id) {
+        super(p, id);
+    }
+    
+    /**
+     * Gets the literal value.
+     * @return the integer literal
+     */
+    public Integer getLiteral() {
+        return literal;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Object jjtAccept(ParserVisitor visitor, Object data) {
+        return visitor.visit(this, data);
+    }
+}

[commons-jexl] 03/19: Tweaks

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit 91e2db19825e00646fd5fa4a6f5d4341388d3a51
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Thu Dec 1 10:56:43 2011 +0000

    Tweaks
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1209031 13f79535-47bb-0310-9956-ffa450edef68
---
 RELEASE-NOTES.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 6edd27e..09712b9 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -24,7 +24,7 @@ $Id$
 INTRODUCTION:
 =============
 
-JEXL is a library intended to facilitate the implementation of dynamic and scripting features in
+The Apache Commons JEXL library facilitates the implementation of dynamic and scripting features in
 applications and frameworks written in Java.
 
 JEXL implements an Expression Language based on some extensions to the JSTL Expression Language supporting most of the

[commons-jexl] 09/19: Binary compatibiliry

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit a9cd7ec0278baebdad4381cd6ca4c6045c8cf9ea
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Fri Dec 2 22:02:03 2011 +0000

    Binary compatibiliry
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1209721 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/commons/jexl2/introspection/UberspectImpl.java | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/jexl2/introspection/UberspectImpl.java b/src/main/java/org/apache/commons/jexl2/introspection/UberspectImpl.java
index e67ced5..bd86661 100644
--- a/src/main/java/org/apache/commons/jexl2/introspection/UberspectImpl.java
+++ b/src/main/java/org/apache/commons/jexl2/introspection/UberspectImpl.java
@@ -164,12 +164,13 @@ public class UberspectImpl extends Introspector implements Uberspect {
 
     /**
      * Returns a class field.
+     * Only for use by sub-classes, will be made protected in a later version
      * @param obj the object
      * @param name the field name
      * @param info debug info
      * @return a {@link Field}.
      */
-    protected Field getField(Object obj, String name, JexlInfo info) {
+    public Field getField(Object obj, String name, JexlInfo info) {
         final Class<?> clazz = obj instanceof Class<?> ? (Class<?>) obj : obj.getClass();
         return getField(clazz, name);
     }
@@ -445,8 +446,10 @@ public class UberspectImpl extends Introspector implements Uberspect {
 
     /**
      * A JexlPropertyGet for public fields.
+     * @deprecated Do not use externally - will be made private in a later version
      */
-    private static final class FieldPropertyGet implements JexlPropertyGet {
+    @Deprecated
+    public static final class FieldPropertyGet implements JexlPropertyGet {
         /**
          * The public field.
          */
@@ -498,8 +501,10 @@ public class UberspectImpl extends Introspector implements Uberspect {
 
     /**
      * A JexlPropertySet for public fields.
+    * @deprecated Do not use externally - will be made private in a later version
      */
-    private static final class FieldPropertySet implements JexlPropertySet {
+    @Deprecated
+    public static final class FieldPropertySet implements JexlPropertySet {
         /**
          * The public field.
          */

[commons-jexl] 10/19: Binary compatibilty fixes

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit bb1ad4ca98f37da19004b68fe8a8aff9a2341497
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Fri Dec 2 22:12:42 2011 +0000

    Binary compatibilty fixes
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1209727 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/commons/jexl2/Interpreter.java | 22 +++++++-
 .../org/apache/commons/jexl2/JexlArithmetic.java   | 10 ++--
 .../java/org/apache/commons/jexl2/JexlEngine.java  | 59 +++++++++++++++++-----
 .../java/org/apache/commons/jexl2/UnifiedJEXL.java |  9 ++--
 4 files changed, 77 insertions(+), 23 deletions(-)

diff --git a/src/main/java/org/apache/commons/jexl2/Interpreter.java b/src/main/java/org/apache/commons/jexl2/Interpreter.java
index da0cfd4..25b4fc8 100644
--- a/src/main/java/org/apache/commons/jexl2/Interpreter.java
+++ b/src/main/java/org/apache/commons/jexl2/Interpreter.java
@@ -27,6 +27,8 @@ import java.util.Set;
 import org.apache.commons.jexl2.parser.SimpleNode;
 import org.apache.commons.logging.Log;
 
+import org.apache.commons.jexl2.parser.ASTFloatLiteral;
+import org.apache.commons.jexl2.parser.ASTIntegerLiteral;
 import org.apache.commons.jexl2.parser.JexlNode;
 import org.apache.commons.jexl2.parser.ASTAdditiveNode;
 import org.apache.commons.jexl2.parser.ASTAdditiveOperator;
@@ -103,9 +105,9 @@ public class Interpreter implements ParserVisitor {
     protected Map<String, Object> functors;
     /** The context to store/retrieve variables. */
     protected final JexlContext context;
-    /** Strict interpreter flag. Do not modify; will be made final in a later version. */
+    /** Strict interpreter flag. Do not modify; will be made final/private in a later version. */
     protected boolean strict;
-    /** Silent intepreter flag.  Do not modify; will be made final in a later version. */
+    /** Silent intepreter flag.  Do not modify; will be made final/private in a later version. */
     protected boolean silent;
     /** Cache executors. */
     protected final boolean cache;
@@ -879,6 +881,22 @@ public class Interpreter implements ParserVisitor {
         }
     }
 
+    /**
+     * @deprecated Do not use
+     */
+    @Deprecated
+    public Object visit(ASTFloatLiteral node, Object data) {
+        throw new UnsupportedOperationException("Method should not be called; only present for API compatibiltiy");
+    }
+
+    /**
+     * @deprecated Do not use
+     */
+    @Deprecated
+    public Object visit(ASTIntegerLiteral node, Object data) {
+        throw new UnsupportedOperationException("Method should not be called; only present for API compatibiltiy");
+    }
+
     /** {@inheritDoc} */
     public Object visit(ASTVar node, Object data) {
         return visit((ASTIdentifier) node, data);
diff --git a/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java b/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
index ef821a9..0149bb3 100644
--- a/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
+++ b/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
@@ -57,9 +57,10 @@ public class JexlArithmetic {
      * @since 2.1 
      */
     protected static final int BIGD_SCALE = -1;
-    /** Whether this JexlArithmetic instance behaves in strict or lenient mode. */
-    /** @deprecated : will become final in next version. */
-    protected boolean strict;
+    /** Whether this JexlArithmetic instance behaves in strict or lenient mode.
+     * May be made final in a later version.
+     */
+    private volatile boolean strict;
     /** 
      * The big decimal math context.
      * @since 2.1 
@@ -98,10 +99,11 @@ public class JexlArithmetic {
      * null is used as an operand.
      * <p>This method is <em>not</em> thread safe; it may be called as an optional step by the JexlEngine
      * in its initialization code before expression creation &amp; evaluation.</p>
+     * @see JexlEngine#setLenient
      * @see JexlEngine#setSilent
      * @see JexlEngine#setDebug
      * @param flag true means no JexlException will occur, false allows them
-     * @deprecated as of 2.1
+     * @deprecated as of 2.1 - may be removed in a later release
      */
     @Deprecated
     void setLenient(boolean flag) {
diff --git a/src/main/java/org/apache/commons/jexl2/JexlEngine.java b/src/main/java/org/apache/commons/jexl2/JexlEngine.java
index bcbd460..2ee9699 100644
--- a/src/main/java/org/apache/commons/jexl2/JexlEngine.java
+++ b/src/main/java/org/apache/commons/jexl2/JexlEngine.java
@@ -154,23 +154,22 @@ public class JexlEngine {
      * Whether expressions evaluated by this engine will throw exceptions (false) or 
      * return null (true) on errors. Default is false.
      */
-    protected boolean silent = false;
-    /**
-     * Whether this engine is in lenient or strict mode; if unspecified, use the arithmetic lenient property.
-     * Provision for version after 2.1.
-     */
-    // protected Boolean strict = null;
+    // TODO could this be private?
+    protected volatile boolean silent = false;
     /**
      * Whether error messages will carry debugging information.
      */
-    protected boolean debug = true;
+    // TODO could this be private?
+    protected volatile boolean debug = true;
     /**
      *  The map of 'prefix:function' to object implementing the functions.
      */
+    // TODO this could probably be private; is it threadsafe?
     protected Map<String, Object> functions = Collections.emptyMap();
     /**
      * The expression cache.
      */
+    // TODO is this thread-safe? Could it be made private?
     protected SoftCache<String, ASTJexlScript> cache = null;
     /**
      * The default cache load factor.
@@ -279,11 +278,11 @@ public class JexlEngine {
     
     /**
      * Sets whether this engine considers unknown variables, methods and constructors as errors or evaluates them
-     * as null.
+     * as null or zero.
      * <p>This method is <em>not</em> thread safe; it should be called as an optional step of the JexlEngine
      * initialization code before expression creation &amp; evaluation.</p>
-     * <p>After 2.1, you will need a JexlThreadedArithmetic instance for this call to also modify the JexlArithmetic
-     * leniency behavior.</p>
+     * <p>As of 2.1, you can use a JexlThreadedArithmetic instance to allow the JexlArithmetic
+     * leniency behavior to be independently specified per thread, whilst still using a single engine.</p>
      * @see JexlEngine#setSilent
      * @see JexlEngine#setDebug
      * @param flag true means no JexlException will occur, false allows them
@@ -293,24 +292,23 @@ public class JexlEngine {
         if (arithmetic instanceof JexlThreadedArithmetic) {
             JexlThreadedArithmetic.setLenient(Boolean.valueOf(flag));
         } else {
-            //strict = flag ? Boolean.FALSE : Boolean.TRUE;
             this.arithmetic.setLenient(flag);
         }
     }
 
     /**
      * Checks whether this engine considers unknown variables, methods and constructors as errors.
-     * <p>If not explicitly set, the arithmetic leniency value applies.</p>
      * @return true if lenient, false if strict
      */
     public boolean isLenient() {
-        //return strict == null ? arithmetic.isLenient() : !strict.booleanValue();
-        return this.arithmetic.isLenient();
+        return arithmetic.isLenient();
     }
 
     /**
      * Sets whether this engine behaves in strict or lenient mode.
      * Equivalent to setLenient(!flag).
+     * <p>This method is <em>not</em> thread safe; it should be called as an optional step of the JexlEngine
+     * initialization code before expression creation &amp; evaluation.</p>
      * @param flag true for strict, false for lenient
      * @since 2.1
      */
@@ -459,6 +457,26 @@ public class JexlEngine {
      * This method parses the script which validates the syntax.
      *
      * @param scriptText A String containing valid JEXL syntax
+     * @param info An info structure to carry debugging information if needed
+     * @return A {@link Script} which can be executed using a {@link JexlContext}.
+     * @throws JexlException if there is a problem parsing the script.
+     * @deprecated Use {@link #createScript(String, JexlInfo, String[])}
+     */
+    @Deprecated
+    public Script createScript(String scriptText, JexlInfo info) {
+        if (scriptText == null) {
+            throw new NullPointerException("scriptText is null");
+        }
+        // Parse the expression
+        ASTJexlScript tree = parse(scriptText, info);
+        return createScript(tree, scriptText);
+    }
+
+    /**
+     * Creates a Script from a String containing valid JEXL syntax.
+     * This method parses the script which validates the syntax.
+     *
+     * @param scriptText A String containing valid JEXL syntax
      * @param names the script parameter names
      * @return A {@link Script} which can be executed using a {@link JexlContext}.
      * @throws JexlException if there is a problem parsing the script.
@@ -1187,6 +1205,19 @@ public class JexlEngine {
      * Parses an expression.
      * @param expression the expression to parse
      * @param info debug information structure
+     * @return the parsed tree
+     * @throws JexlException if any error occured during parsing
+     * @deprecated Use {@link #parse(CharSequence, JexlInfo, Scope)} instead
+     */
+    @Deprecated
+    protected ASTJexlScript parse(CharSequence expression, JexlInfo info) {
+        return parse(expression, info, null);
+    }
+
+    /**
+     * Parses an expression.
+     * @param expression the expression to parse
+     * @param info debug information structure
      * @param frame the script frame to use
      * @return the parsed tree
      * @throws JexlException if any error occured during parsing
diff --git a/src/main/java/org/apache/commons/jexl2/UnifiedJEXL.java b/src/main/java/org/apache/commons/jexl2/UnifiedJEXL.java
index af2d0b2..13b9183 100644
--- a/src/main/java/org/apache/commons/jexl2/UnifiedJEXL.java
+++ b/src/main/java/org/apache/commons/jexl2/UnifiedJEXL.java
@@ -276,10 +276,11 @@ public final class UnifiedJEXL {
         /**
          * Formats this expression, adding its source string representation in
          * comments if available: 'expression /*= source *\/'' .
+         * <b>Note:</b> do not override; will be made final in a future release.
          * @return the formatted expression string
          */
         @Override
-        public final String toString() {
+        public String toString() {
             StringBuilder strb = new StringBuilder();
             asString(strb);
             if (source != this) {
@@ -343,11 +344,12 @@ public final class UnifiedJEXL {
          * <p>
          * If the underlying JEXL engine is silent, errors will be logged through its logger as warning.
          * </p>
+         * <b>Note:</b> do not override; will be made final in a future release.
          * @param context the context to use for immediate expression evaluations
          * @return an expression or null if an error occurs and the {@link JexlEngine} is running in silent mode
          * @throws UnifiedJEXL.Exception if an error occurs and the {@link JexlEngine} is not in silent mode
          */
-        public final Expression prepare(JexlContext context) {
+        public Expression prepare(JexlContext context) {
             try {
                 Interpreter interpreter = new Interpreter(jexl, context, !jexl.isLenient(), jexl.isSilent());
                 if (context instanceof TemplateContext) {
@@ -369,12 +371,13 @@ public final class UnifiedJEXL {
          * <p>
          * If the underlying JEXL engine is silent, errors will be logged through its logger as warning.
          * </p>
+         * <b>Note:</b> do not override; will be made final in a future release.
          * @param context the variable context
          * @return the result of this expression evaluation or null if an error occurs and the {@link JexlEngine} is
          * running in silent mode
          * @throws UnifiedJEXL.Exception if an error occurs and the {@link JexlEngine} is not silent
          */
-        public final Object evaluate(JexlContext context) {
+        public Object evaluate(JexlContext context) {
             try {
                 Interpreter interpreter = new Interpreter(jexl, context, !jexl.isLenient(), jexl.isSilent());
                 if (context instanceof TemplateContext) {

[commons-jexl] 17/19: Update year

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit d797d479ea107c976e2628583c5497259c3a4475
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Thu Dec 8 13:26:57 2011 +0000

    Update year
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1211872 13f79535-47bb-0310-9956-ffa450edef68
---
 NOTICE.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NOTICE.txt b/NOTICE.txt
index 83b2c85..91f1f8c 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,5 +1,5 @@
 Apache Commons JEXL
-Copyright 2001-2010 The Apache Software Foundation
+Copyright 2001-2011 The Apache Software Foundation
 
 This product includes software developed by
 The Apache Software Foundation (http://www.apache.org/).

[commons-jexl] 01/19: creating 2.0 branch before switching to 3.0

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit 7b95da4aeee27c5608efa64d303d1184ebc93a72
Merge: 477629e 60a7ba3
Author: Henri Biestro <he...@apache.org>
AuthorDate: Tue Nov 29 14:50:59 2011 +0000

    creating 2.0 branch before switching to 3.0
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1207894 13f79535-47bb-0310-9956-ffa450edef68

 BUILDING.txt                                       |   11 +
 NOTICE.txt                                         |    2 +-
 RELEASE-NOTES.txt                                  |  184 ++-
 STATUS.html                                        |   17 +-
 doap_jexl.rdf                                      |   20 +-
 jexl2-compat/pom.xml                               |  102 ++
 .../java/org/apache/commons/jexl/Expression.java   |   25 +-
 .../org/apache/commons/jexl/ExpressionFactory.java |   49 +
 .../java/org/apache/commons/jexl/JexlContext.java  |   12 +-
 .../java/org/apache/commons/jexl/JexlHelper.java   |    6 +-
 .../main/java/org/apache/commons/jexl/JexlOne.java |  277 ++++
 .../main/java/org/apache/commons/jexl/Script.java  |   21 +-
 .../org/apache/commons/jexl/ScriptFactory.java     |   52 +-
 .../commons/jexl/context/HashMapContext.java       |    4 +-
 .../org/apache/commons/jexl/context/package.html   |    6 +-
 .../main/java/org/apache/commons/jexl/package.html |   38 +
 .../java/org/apache/commons/jexl/ScriptTest.java   |   23 +-
 pom.xml                                            |  499 ++++---
 src/main/assembly/src.xml                          |    9 +-
 src/main/config/checkstyle.xml                     |   58 +-
 src/main/config/findbugs-exclude-filter.xml        |   42 +
 .../org/apache/commons/jexl/JexlArithmetic.java    |  736 ----------
 .../java/org/apache/commons/jexl/JexlEngine.java   |  663 ---------
 .../org/apache/commons/jexl/JexlException.java     |  103 --
 .../java/org/apache/commons/jexl/UnifiedJEXL.java  | 1018 --------------
 src/main/java/org/apache/commons/jexl/package.html |   80 --
 .../java/org/apache/commons/jexl/parser/Parser.jjt |  528 -------
 .../org/apache/commons/jexl/parser/SimpleNode.java |  131 --
 .../org/apache/commons/jexl/parser/package.html    |   34 -
 .../commons/jexl/scripting/JexlScriptEngine.java   |  280 ----
 .../commons/jexl/scripting/JexlScriptObject.java   |   82 --
 .../org/apache/commons/jexl/scripting/package.html |   34 -
 .../apache/commons/jexl/util/ArrayListWrapper.java |   62 -
 .../jexl/util/introspection/Introspector.java      |  133 --
 .../jexl/util/introspection/IntrospectorBase.java  |  251 ----
 .../jexl/util/introspection/UberspectImpl.java     |  147 --
 .../commons/jexl/util/introspection/package.html   |   55 -
 .../java/org/apache/commons/jexl/util/package.html |   33 -
 .../Info.java => jexl2/DebugInfo.java}             |   32 +-
 .../apache/commons/{jexl => jexl2}/Debugger.java   |  228 +--
 .../apache/commons/{jexl => jexl2}/Expression.java |   10 +-
 .../commons/{jexl => jexl2}/ExpressionImpl.java    |   85 +-
 .../commons/{jexl => jexl2}/Interpreter.java       | 1143 +++++++++------
 .../org/apache/commons/jexl2/JexlArithmetic.java   | 1112 +++++++++++++++
 .../java/org/apache/commons/jexl2/JexlContext.java |   49 +
 .../java/org/apache/commons/jexl2/JexlEngine.java  | 1324 ++++++++++++++++++
 .../org/apache/commons/jexl2/JexlException.java    |  401 ++++++
 .../DebugInfo.java => jexl2/JexlInfo.java}         |   20 +-
 .../commons/jexl2/JexlThreadedArithmetic.java      |  117 ++
 .../org/apache/commons/{jexl => jexl2}/Main.java   |   37 +-
 .../java/org/apache/commons/jexl2/MapContext.java  |   62 +
 .../NamespaceResolver.java}                        |   30 +-
 .../org/apache/commons/jexl2/ObjectContext.java    |   54 +
 .../org/apache/commons/jexl2/ReadonlyContext.java  |   53 +
 src/main/java/org/apache/commons/jexl2/Script.java |  107 ++
 .../java/org/apache/commons/jexl2/UnifiedJEXL.java | 1457 ++++++++++++++++++++
 .../util => jexl2/internal}/AbstractExecutor.java  |  160 ++-
 .../util => jexl2/internal}/ArrayIterator.java     |    5 +-
 .../commons/jexl2/internal/ArrayListWrapper.java   |  199 +++
 .../internal}/BooleanGetExecutor.java              |   31 +-
 .../util => jexl2/internal}/DuckGetExecutor.java   |   29 +-
 .../util => jexl2/internal}/DuckSetExecutor.java   |   50 +-
 .../internal}/EnumerationIterator.java             |    6 +-
 .../util => jexl2/internal}/Introspector.java      |  195 ++-
 .../util => jexl2/internal}/ListGetExecutor.java   |   45 +-
 .../util => jexl2/internal}/ListSetExecutor.java   |   61 +-
 .../util => jexl2/internal}/MapGetExecutor.java    |   28 +-
 .../util => jexl2/internal}/MapSetExecutor.java    |   27 +-
 .../util => jexl2/internal}/MethodExecutor.java    |   43 +-
 .../internal}/PropertyGetExecutor.java             |    9 +-
 .../internal}/PropertySetExecutor.java             |    9 +-
 .../internal}/introspection/ClassMap.java          |  112 +-
 .../internal/introspection/IntrospectorBase.java   |  327 +++++
 .../internal}/introspection/MethodKey.java         |  148 +-
 .../internal}/introspection/MethodMap.java         |   13 +-
 .../jexl2/internal/introspection/package.html      |   39 +
 .../org/apache/commons/jexl2/internal/package.html |   37 +
 .../util => jexl2}/introspection/JexlMethod.java   |   46 +-
 .../introspection/JexlPropertyGet.java             |   49 +-
 .../introspection/JexlPropertySet.java             |   44 +-
 .../commons/jexl2/introspection/Sandbox.java       |  396 ++++++
 .../jexl2/introspection/SandboxUberspectImpl.java  |  113 ++
 .../util => jexl2}/introspection/Uberspect.java    |   81 +-
 .../commons/jexl2/introspection/UberspectImpl.java |  552 ++++++++
 .../commons/jexl2/introspection/package.html       |   34 +
 .../java/org/apache/commons/jexl2/package.html     |  299 ++++
 .../commons/jexl2/parser/ASTArrayLiteral.java      |   72 +
 .../parser/ASTIdentifier.java}                     |   42 +-
 .../apache/commons/jexl2/parser/ASTJexlScript.java |   96 ++
 .../apache/commons/jexl2/parser/ASTMapLiteral.java |   75 +
 .../commons/jexl2/parser/ASTNumberLiteral.java     |  156 +++
 .../parser/ASTReferenceExpression.java}            |   31 +-
 .../parser/ASTStringLiteral.java}                  |   45 +-
 .../DebugInfo.java => jexl2/parser/ASTVar.java}    |   29 +-
 .../org/apache/commons/jexl2/parser/JexlNode.java  |   95 ++
 .../apache/commons/jexl2/parser/JexlParser.java    |  129 ++
 .../commons/jexl2/parser/ParseException.java       |   99 ++
 .../org/apache/commons/jexl2/parser/Parser.jjt     |  623 +++++++++
 .../apache/commons/jexl2/parser/SimpleNode.java    |  185 +++
 .../{jexl => jexl2}/parser/StringParser.java       |  110 +-
 .../apache/commons/jexl2/parser/TokenMgrError.java |  145 ++
 .../org/apache/commons/jexl2/parser/package.html   |   31 +
 .../commons/jexl2/scripting/JexlScriptEngine.java  |  376 +++++
 .../scripting/JexlScriptEngineFactory.java         |   51 +-
 .../commons/{jexl => jexl2}/scripting/Main.java    |   19 +-
 .../apache/commons/jexl2/scripting/package.html    |   31 +
 .../services/javax.script.ScriptEngineFactory      |    2 +-
 src/site/site.xml                                  |   26 +-
 xdocs/cvs-usage.xml => src/site/xdoc/building.xml  |   32 +-
 src/site/xdoc/changes.xml                          |  141 ++
 {xdocs => src/site/xdoc}/download_jexl.xml         |  117 +-
 src/site/xdoc/index.xml                            |  206 +++
 {xdocs => src/site/xdoc}/issue-tracking.xml        |    0
 src/site/xdoc/mail-lists.xml                       |  202 +++
 {xdocs => src/site/xdoc}/reference/examples.xml    |  102 +-
 {xdocs => src/site/xdoc}/reference/index.xml       |    0
 {xdocs => src/site/xdoc}/reference/jsr223.xml      |   16 +-
 {xdocs => src/site/xdoc}/reference/syntax.xml      |  122 +-
 .../java/org/apache/commons/jexl/CacheTest.java    |  572 --------
 .../java/org/apache/commons/jexl/IssuesTest.java   |  320 -----
 .../java/org/apache/commons/jexl/MethodTest.java   |  155 ---
 .../org/apache/commons/jexl/UnifiedJEXLTest.java   |  240 ----
 .../org/apache/commons/jexl/junit/Asserter.java    |   85 --
 .../jexl/util/introspection/DiscoveryTest.java     |   63 -
 .../commons/{jexl => jexl2}/ArithmeticTest.java    |  176 ++-
 .../commons/{jexl => jexl2}/ArrayAccessTest.java   |   83 +-
 .../commons/{jexl => jexl2}/ArrayLiteralTest.java  |   54 +-
 .../apache/commons/{jexl => jexl2}/AssignTest.java |   44 +-
 .../{jexl => jexl2}/BitwiseOperatorTest.java       |    9 +-
 .../apache/commons/{jexl => jexl2}/BlockTest.java  |   18 +-
 .../java/org/apache/commons/jexl2/CacheTest.java   |  678 +++++++++
 .../org/apache/commons/jexl2/ClassCreator.java     |  144 ++
 .../org/apache/commons/jexl2/ClassCreatorTest.java |  191 +++
 .../org/apache/commons/{jexl => jexl2}/Foo.java    |   15 +-
 .../commons/{jexl => jexl2}/ForEachTest.java       |   62 +-
 .../org/apache/commons/{jexl => jexl2}/IfTest.java |  164 ++-
 .../java/org/apache/commons/jexl2/IssuesTest.java  |  830 +++++++++++
 .../org/apache/commons/{jexl => jexl2}/Jexl.java   |   16 +-
 .../apache/commons/{jexl => jexl2}/JexlTest.java   |  241 ++--
 .../commons/{jexl => jexl2}/JexlTestCase.java      |   97 +-
 .../commons/{jexl => jexl2}/MapLiteralTest.java    |   29 +-
 .../java/org/apache/commons/jexl2/MethodTest.java  |  360 +++++
 .../commons/{jexl => jexl2}/ParseFailuresTest.java |   45 +-
 .../org/apache/commons/jexl2/PublicFieldsTest.java |  120 ++
 .../java/org/apache/commons/jexl2/SandboxTest.java |  258 ++++
 .../apache/commons/jexl2/ScriptCallableTest.java   |  182 +++
 .../apache/commons/{jexl => jexl2}/ScriptTest.java |   23 +-
 .../org/apache/commons/jexl2/UnifiedJEXLTest.java  |  423 ++++++
 .../java/org/apache/commons/jexl2/VarTest.java     |  266 ++++
 .../apache/commons/{jexl => jexl2}/WhileTest.java  |   19 +-
 .../{jexl => jexl2}/examples/ArrayTest.java        |   10 +-
 .../examples/MethodPropertyTest.java               |   12 +-
 .../commons/{jexl => jexl2}/examples/Output.java   |    2 +-
 .../internal/introspection/DiscoveryTest.java      |  221 +++
 .../internal}/introspection/MethodKeyTest.java     |   20 +-
 .../org/apache/commons/jexl2/junit/Asserter.java   |  142 ++
 .../{jexl => jexl2}/junit/AsserterTest.java        |   11 +-
 .../commons/{jexl => jexl2}/junit/package.html     |    2 +-
 .../commons/{jexl => jexl2}/parser/ParserTest.java |   33 +-
 .../scripting/JexlScriptEngineOptionalTest.java    |   60 +
 .../scripting/JexlScriptEngineTest.java            |   72 +-
 xdocs/building.xml                                 |   62 -
 xdocs/changes.xml                                  |   56 -
 xdocs/images/jexl-logo-white.png                   |  Bin 11419 -> 0 bytes
 xdocs/images/jexl-logo-white.xcf                   |  Bin 20499 -> 0 bytes
 xdocs/index.xml                                    |  161 ---
 xdocs/navigation.xml                               |   40 -
 xdocs/releases.xml                                 |   49 -
 xdocs/style/maven.css                              |  114 --
 xdocs/style/print.css                              |    7 -
 xdocs/style/project.css                            |    1 -
 xdocs/style/tigris.css                             |  789 -----------
 xdocs/xdoc.xsl                                     |   67 -
 173 files changed, 17412 insertions(+), 9242 deletions(-)

[commons-jexl] 02/19: Partial JEXL-83 fix rollback, deprecated setLenient and associated field in JexlArithmetic in an attempt to release 2.1

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit feeffea95fda19116c778ee2ff989304bb89d61b
Author: Henri Biestro <he...@apache.org>
AuthorDate: Wed Nov 30 22:10:55 2011 +0000

    Partial JEXL-83 fix rollback, deprecated setLenient and associated field in JexlArithmetic in an attempt to release 2.1
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1208830 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/commons/jexl2/JexlArithmetic.java    | 21 +++++++++++++++++++--
 .../java/org/apache/commons/jexl2/JexlEngine.java   | 14 +++++++++-----
 2 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java b/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
index 21e0aad..8c831c8 100644
--- a/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
+++ b/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
@@ -55,7 +55,8 @@ public class JexlArithmetic {
     /** Default BigDecimal scale. */
     protected static final int BIGD_SCALE = -1;
     /** Whether this JexlArithmetic instance behaves in strict or lenient mode. */
-    protected final boolean strict;
+    /** @deprecated : will become final in next version. */
+    protected boolean strict;
     /** The big decimal math context. */
     protected final MathContext mathContext;
     /** The big decimal scale. */
@@ -81,6 +82,22 @@ public class JexlArithmetic {
         this.mathContext = bigdContext;
         this.mathScale = bigdScale;
     }
+    
+    
+    /**
+     * Sets whether this JexlArithmetic instance triggers errors during evaluation when
+     * null is used as an operand.
+     * <p>This method is <em>not</em> thread safe; it may be called as an optional step by the JexlEngine
+     * in its initialization code before expression creation &amp; evaluation.</p>
+     * @see JexlEngine#setSilent
+     * @see JexlEngine#setDebug
+     * @param flag true means no JexlException will occur, false allows them
+     * @deprecated as of 2.1
+     */
+    @Deprecated
+    void setLenient(boolean flag) {
+        this.strict = !flag;
+    }
 
     /**
      * Checks whether this JexlArithmetic instance triggers errors during evaluation
@@ -101,7 +118,7 @@ public class JexlArithmetic {
     }
 
     /**
-     * The BigDecimal scale used for comparison and coericion operations.
+     * The BigDecimal scale used for comparison and coercion operations.
      * @return the scale
      * @since 2.1
      */
diff --git a/src/main/java/org/apache/commons/jexl2/JexlEngine.java b/src/main/java/org/apache/commons/jexl2/JexlEngine.java
index 0a8d6a1..8e2020b 100644
--- a/src/main/java/org/apache/commons/jexl2/JexlEngine.java
+++ b/src/main/java/org/apache/commons/jexl2/JexlEngine.java
@@ -157,8 +157,9 @@ public class JexlEngine {
     protected boolean silent = false;
     /**
      * Whether this engine is in lenient or strict mode; if unspecified, use the arithmetic lenient property.
+     * Provision for version after 2.1.
      */
-    protected Boolean strict = null;
+    // protected Boolean strict = null;
     /**
      * Whether error messages will carry debugging information.
      */
@@ -274,23 +275,25 @@ public class JexlEngine {
     public boolean isSilent() {
         return this.silent;
     }
-
+    
     /**
      * Sets whether this engine considers unknown variables, methods and constructors as errors or evaluates them
      * as null.
      * <p>This method is <em>not</em> thread safe; it should be called as an optional step of the JexlEngine
      * initialization code before expression creation &amp; evaluation.</p>
-     * <p>As of 2.1, you need a JexlThreadedArithmetic instance for this call to also modify the JexlArithmetic
+     * <p>After 2.1, you will need a JexlThreadedArithmetic instance for this call to also modify the JexlArithmetic
      * leniency behavior.</p>
      * @see JexlEngine#setSilent
      * @see JexlEngine#setDebug
      * @param flag true means no JexlException will occur, false allows them
      */
+    @SuppressWarnings("deprecation")
     public void setLenient(boolean flag) {
         if (arithmetic instanceof JexlThreadedArithmetic) {
             JexlThreadedArithmetic.setLenient(Boolean.valueOf(flag));
         } else {
-            strict = flag ? Boolean.FALSE : Boolean.TRUE;
+            //strict = flag ? Boolean.FALSE : Boolean.TRUE;
+            this.arithmetic.setLenient(flag);
         }
     }
 
@@ -300,7 +303,8 @@ public class JexlEngine {
      * @return true if lenient, false if strict
      */
     public boolean isLenient() {
-        return strict == null ? arithmetic.isLenient() : !strict.booleanValue();
+        //return strict == null ? arithmetic.isLenient() : !strict.booleanValue();
+        return this.arithmetic.isLenient();
     }
 
     /**

[commons-jexl] 12/19: Document compatibilty

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit f6f5881d746a010239d9ce4695b9b34a71fd62f9
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Sun Dec 4 19:13:26 2011 +0000

    Document compatibilty
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/branches/2.0@1210180 13f79535-47bb-0310-9956-ffa450edef68
---
 RELEASE-NOTES.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 09712b9..7d3676e 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -35,6 +35,13 @@ Its goal is to expose scripting features usable by technical operatives or consu
 
   http://commons.apache.org/jexl/
 
+Compatibility with previous releases
+====================================
+Version 2.1 is binary compatible with 2.0.1.
+
+However it is not source compatible.
+New methods have been added to the org.apache.commons.jexl2.Script and org.apache.commons.jexl2.JexlInfo interfaces.
+Any source code that implements these interfaces will need to be updated.
 
 What's new in 2.1:
 ==================

[commons-jexl] 19/19: Tag 2.1 RC3

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to tag 2.1
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit 19760100ab965878932d3e7fe326f9eb404a7649
Author: Sebastian Bazley <se...@apache.org>
AuthorDate: Thu Dec 8 16:28:45 2011 +0000

    Tag 2.1 RC3
    
    git-svn-id: https://svn-us.apache.org/repos/asf/commons/proper/jexl/tags/COMMONS_JEXL_2_1-RC3@1211956 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 0cb432f..dd6f3b5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-jexl</artifactId>
-    <version>2.1-SNAPSHOT</version>
+    <version>2.1</version>
     <name>Commons JEXL</name>
     <inceptionYear>2001</inceptionYear>
     <description>The Commons Jexl library is an implementation of the JSTL Expression Language with extensions.</description>
@@ -36,9 +36,9 @@
     </issueManagement>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/jexl/branches/2.0</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/jexl/branches/2.0</developerConnection>
-        <url>http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/jexl/tags/COMMONS_JEXL_2_1</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/jexl/tags/COMMONS_JEXL_2_1</developerConnection>
+        <url>http://svn.apache.org/viewvc/commons/proper/jexl/tags/COMMONS_JEXL_2_1</url>
     </scm>
 
     <distributionManagement>