jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1709167 - /jmeter/trunk/src/core/org/apache/jmeter/control/IfController.java
Date Sat, 17 Oct 2015 13:47:18 GMT
Author: pmouawad
Date: Sat Oct 17 13:47:18 2015
New Revision: 1709167

URL: http://svn.apache.org/viewvc?rev=1709167&view=rev
Log:
Bug 58406 - IfController : Use Nashorn Engine if available for JavaScript evaluation
Apply same rules as for JavaScript function
Bugzilla Id: 58406

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/control/IfController.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/control/IfController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/control/IfController.java?rev=1709167&r1=1709166&r2=1709167&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/control/IfController.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/control/IfController.java Sat Oct 17 13:47:18
2015
@@ -66,6 +66,8 @@ public class IfController extends Generi
 
     private static final long serialVersionUID = 241L;
 
+    private static final String NASHORN_ENGINE_NAME = "nashorn"; //$NON-NLS-1$
+
     private static final String CONDITION = "IfController.condition"; //$NON-NLS-1$
 
     private static final String EVALUATE_ALL = "IfController.evaluateAll"; //$NON-NLS-1$
@@ -75,8 +77,8 @@ public class IfController extends Generi
     private static final String USE_RHINO_ENGINE_PROPERTY = "javascript.use_rhino"; //$NON-NLS-1$
 
     private static final boolean USE_RHINO_ENGINE = 
-            getInstance().getEngineByName("nashorn") == null || //$NON-NLS-1$
-            JMeterUtils.getPropDefault(USE_RHINO_ENGINE_PROPERTY, true) ;
+            JMeterUtils.getPropDefault(USE_RHINO_ENGINE_PROPERTY, true) ||
+            getInstance().getEngineByName(NASHORN_ENGINE_NAME) == null;
 
     
     private static final ThreadLocal<ScriptEngine> NASHORN_ENGINE = new ThreadLocal<ScriptEngine>()
{



Mime
View raw message