commons-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=800348&view=rev
Log:
Oops - don't use == to compare Strings!

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

Modified: commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptEngineFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptEngineFactory.java?rev=800348&r1=800347&r2=800348&view=diff
==============================================================================
--- commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptEngineFactory.java
(original)
+++ commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptEngineFactory.java
Mon Aug  3 13:10:56 2009
@@ -99,17 +99,17 @@
 
     /** {@inheritDoc} */
     public Object getParameter(String key) {
-        if (key == ScriptEngine.ENGINE) {
+        if (key.equals(ScriptEngine.ENGINE)) {
             return getEngineName();
-        } else if (key == ScriptEngine.ENGINE_VERSION) {
+        } else if (key.equals(ScriptEngine.ENGINE_VERSION)) {
             return getEngineVersion();
-        } else if (key == ScriptEngine.NAME) {
+        } else if (key.equals(ScriptEngine.NAME)) {
             return getNames();
-        } else if (key == ScriptEngine.LANGUAGE) {
+        } else if (key.equals(ScriptEngine.LANGUAGE)) {
             return getLanguageName();
-        } else if(key == ScriptEngine.ENGINE_VERSION) {
+        } else if(key.equals(ScriptEngine.ENGINE_VERSION)) {
             return getLanguageVersion();
-        } else if (key == "THREADING") {
+        } else if (key.equals("THREADING")) {
             return null;//"MULTITHREADED"; // TODO what is the correct value here?
         } 
         return null;



Mime
View raw message