jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1706622 - in /jmeter/trunk: bin/jmeter.properties src/core/org/apache/jmeter/control/IfController.java xdocs/changes.xml
Date Sat, 03 Oct 2015 20:27:46 GMT
Author: pmouawad
Date: Sat Oct  3 20:27:45 2015
New Revision: 1706622

URL: http://svn.apache.org/viewvc?rev=1706622&view=rev
Log:
Bug 58406 - IfController : Allow use of Nashorn Engine if available for JavaScript evaluation
Apply what has been discussed at:
- http://mail-archives.apache.org/mod_mbox/jmeter-dev/201509.mbox/%3C55F9CB45.9040203%40internetallee.de%3E

Rename property and make Rhino still the default.
Add a note.

Bugzilla Id: 58406

Modified:
    jmeter/trunk/bin/jmeter.properties
    jmeter/trunk/src/core/org/apache/jmeter/control/IfController.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/bin/jmeter.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.properties?rev=1706622&r1=1706621&r2=1706622&view=diff
==============================================================================
--- jmeter/trunk/bin/jmeter.properties (original)
+++ jmeter/trunk/bin/jmeter.properties Sat Oct  3 20:27:45 2015
@@ -1023,12 +1023,12 @@ beanshell.server.file=../extras/startup.
 # Default is true. Use false to revert to previous behaviour
 #CookieManager.check.cookies=true
 
-# Ability to revert to Rhino as default Javascript Engine used by IfController
+# Ability to switch to Nashorn as default Javascript Engine used by IfController and __javaScript
function
 # JMeter works as following:
 # - JDK < 8 : Rhino
-# - JDK >= 8 : Nashorn
-# If you want to use Rhino on JDK8, set this property to true
-#ifcontroller.use_rhino=false
+# - JDK >= 8 and javascript.use_rhino=false: Nashorn
+# If you want to use Nashorn on JDK8, set this property to false
+#javascript.use_rhino=true
 
 # (2.0.3) JMeterThread behaviour has been changed to set the started flag before
 # the controllers are initialised. This is so controllers can access variables earlier. 

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=1706622&r1=1706621&r2=1706622&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  3 20:27:45
2015
@@ -72,11 +72,11 @@ public class IfController extends Generi
 
     private static final String USE_EXPRESSION = "IfController.useExpression"; //$NON-NLS-1$
     
-    private static final String USE_RHINO_ENGINE_PROPERTY = "ifcontroller.use_rhino";
+    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, false) ;
+            JMeterUtils.getPropDefault(USE_RHINO_ENGINE_PROPERTY, true) ;
 
     
     private static final ThreadLocal<ScriptEngine> NASHORN_ENGINE = new ThreadLocal<ScriptEngine>()
{

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1706622&r1=1706621&r2=1706622&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sat Oct  3 20:27:45 2015
@@ -74,7 +74,9 @@ Summary
 
 <ul>
     <li>In RandomTimer class, protected instance timer has been replaced by getTimer()
protected method, this is related to <bugzilla>58100</bugzilla>. This may impact
3rd party plugins.</li>
-    <li>If Controller will now use by default Nashorn Engine under Java8. If you want
to revert to Rhino Engine, use property <code>ifcontroller.use_rhino=true</code>,
see <bugzilla>58406</bugzilla></li>
+    <li>Since version 2.14, you can use Nashorn Engine (default javascript engine is
Rhino) under Java8 for Elements that use Javascript Engine (__javaScript, IfController). If
you want to use it, use property <code>javascript.use_rhino=false</code>, see
<bugzilla>58406</bugzilla>.
+    Note in future versions, we will switch to Nashorn by default, so users are encouraged
to report any issue related to broken code when using Nashorn instead of Rhino.
+    </li>
 </ul>
 
 <!-- =================== Improvements =================== -->
@@ -95,7 +97,7 @@ Summary
 
 <h3>Controllers</h3>
 <ul>
-    <li><bug>58406</bug>IfController : Use Nashorn Engine if available
for JavaScript evaluation</li>
+    <li><bug>58406</bug>IfController : Allow use of Nashorn Engine if available
for JavaScript evaluation</li>
     <li><bug>58281</bug>RandomOrderController : Improve randomization algorithm
performance. Contributed by Graham Russell (jmeter at ham1.co.uk)</li> 
 </ul>
 



Mime
View raw message