commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r800361 - /commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptEngine.java
Date Mon, 03 Aug 2009 13:22:01 GMT
Author: sebb
Date: Mon Aug  3 13:22:01 2009
New Revision: 800361

URL: http://svn.apache.org/viewvc?rev=800361&view=rev
Log:
Default constructor was unusable because this(null) is not allowed.
Just use default factory; simplifies getFactory() too.

Modified:
    commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptEngine.java

Modified: commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptEngine.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptEngine.java?rev=800361&r1=800360&r2=800361&view=diff
==============================================================================
--- commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptEngine.java
(original)
+++ commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptEngine.java
Mon Aug  3 13:22:01 2009
@@ -72,9 +72,12 @@
     
     /**
      * Default constructor.
+     * <p>
+     * Only intended for use when not using a factory.
+     * Sets the factory to {@link JexlScriptEngineFactory}.
      */
     public JexlScriptEngine() {
-        this(null);
+        this(SingletonHolder.DEFAULT_FACTORY);
     }
 
     /**
@@ -156,7 +159,7 @@
 
     /** {@inheritDoc} */
     public ScriptEngineFactory getFactory() {
-        return parentFactory == null ? SingletonHolder.DEFAULT_FACTORY : parentFactory;
+        return parentFactory;
     }
 
     /**



Mime
View raw message