You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2016/10/08 08:34:01 UTC

svn commit: r1763870 - in /jmeter/trunk: src/core/org/apache/jmeter/util/ src/jorphan/org/apache/commons/jexl/bsf/ test/src/org/apache/jmeter/functions/ xdocs/ xdocs/usermanual/

Author: pmouawad
Date: Sat Oct  8 08:34:00 2016
New Revision: 1763870

URL: http://svn.apache.org/viewvc?rev=1763870&view=rev
Log:
Bug 60225 - Drop deprecated __jexl function and dependency on commons-jexl 
Drop junit test class, JexlEngine for BSF and update docs
Bugzilla Id: 60225

Removed:
    jmeter/trunk/src/jorphan/org/apache/commons/jexl/bsf/JexlEngine.java
    jmeter/trunk/test/src/org/apache/jmeter/functions/TestJexlFunction.java
Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/BSFBeanInfoSupport.java
    jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/usermanual/component_reference.xml
    jmeter/trunk/xdocs/usermanual/functions.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/BSFBeanInfoSupport.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/BSFBeanInfoSupport.java?rev=1763870&r1=1763869&r2=1763870&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/BSFBeanInfoSupport.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/BSFBeanInfoSupport.java Sat Oct  8 08:34:00 2016
@@ -32,12 +32,11 @@ public abstract class BSFBeanInfoSupport
 
     static {
         Properties languages = JMeterUtils.loadProperties("org/apache/bsf/Languages.properties"); // $NON-NLS-1$
-        LANGUAGE_TAGS = new String[languages.size() + 1];
+        LANGUAGE_TAGS = new String[languages.size()];
         int i = 0;
         for (Object language : languages.keySet()) {
             LANGUAGE_TAGS[i++] = language.toString();
         }
-        LANGUAGE_TAGS[i] = "jexl"; // $NON-NLS-1$
         Arrays.sort(LANGUAGE_TAGS);
     }
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java?rev=1763870&r1=1763869&r2=1763870&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java Sat Oct  8 08:34:00 2016
@@ -40,14 +40,11 @@ import org.apache.log.Logger;
 public abstract class BSFTestElement extends ScriptingTestElement
     implements Serializable
 {
-    private static final long serialVersionUID = 233L;
+    private static final long serialVersionUID = 234L;
 
     private static final Logger log = LoggingManager.getLoggerForClass();
 
     static {
-        BSFManager.registerScriptingEngine("jexl", //$NON-NLS-1$
-                "org.apache.commons.jexl.bsf.JexlEngine", //$NON-NLS-1$
-                new String[]{"jexl"}); //$NON-NLS-1$
         log.info("Registering JMeter version of JavaScript engine as work-round for BSF-22");
         BSFManager.registerScriptingEngine("javascript", //$NON-NLS-1$
                 "org.apache.jmeter.util.BSFJavaScriptEngine", //$NON-NLS-1$

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1763870&r1=1763869&r2=1763870&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Sat Oct  8 08:34:00 2016
@@ -81,7 +81,7 @@ Summary
 <ul>
     <li><bug>60222</bug>Remove deprecated elements Distribution Graph, Spline Visualizer</li>
     <li><bug>60224</bug>Deprecate <code><a href="./usermanual/component_reference.html#Monitor_Results_(DEPRECATED)">Monitor Results</a></code> listener. It will be dropped in next version</li>
-    <li><bug>60225</bug>Drop deprecated <code>__jexl</code> function and dependency on <code>commons-jexl-1.1.jar</code> This function can be easily replaced with <code><a href="./usermanual/functions.html#__jexl3">__jexl3</a></code> function</li>
+    <li><bug>60225</bug>Drop deprecated <code>__jexl</code> function, jexl support in BSF and dependency on <code>commons-jexl-1.1.jar</code> This function can be easily replaced with <code><a href="./usermanual/functions.html#__jexl3">__jexl3</a></code> function</li>
 </ul>
 
 <!-- =================== Improvements =================== -->

Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=1763870&r1=1763869&r2=1763870&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jmeter/trunk/xdocs/usermanual/component_reference.xml Sat Oct  8 08:34:00 2016
@@ -1155,7 +1155,6 @@ Beware however that misuse of any method
         <p>By default, JMeter supports the following languages:</p>
         <ul>
         <li>javascript</li>
-        <li>jexl</li>
         <li>xslt</li>
         </ul>
         <note>Unlike the BeanShell sampler, the interpreter is not saved between invocations.</note>
@@ -1164,7 +1163,7 @@ Beware however that misuse of any method
     <property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
     <property name="Scripting Language" required="Yes">Name of the BSF scripting language to be used.
       <note>N.B. Not all the languages in the drop-down list are supported by default.
-        The following are supported: jexl, javascript, xslt.
+        The following are supported: javascript, xslt.
         Others may be available if the appropriate jar is installed in the JMeter lib directory.
       </note>
     </property>
@@ -1271,8 +1270,7 @@ props.put("PROP1","1234");</source>
 <properties>
     <property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
     <property name="Scripting Language" required="Yes">Name of the JSR223 scripting language to be used.
-      <note>N.B. Not all the languages in the drop-down list are supported by default.
-        The following are supported: jexl, javascript, xslt.
+      <note>There are other languages supported than those that appear in the drop-down list.
         Others may be available if the appropriate jar is installed in the JMeter lib directory.
       </note>
     </property>
@@ -2275,7 +2273,7 @@ Please refer to the <complink name="Cons
         The script can be processed as a variable expression, rather than requiring Javascript.
         It was always possible to use functions and variables in the Javascript condition, so long as they evaluated to "<code>true</code>" or "<code>false</code>";
         now this can be done without the overhead of using Javascript as well. For example, previously one could use the condition:
-        <code>${__jexl(${VAR} == 23)}</code> and this would be evaluated as <code>true</code>/<code>false</code>, the result would then be passed to Javascript
+        <code>${__jexl3(${VAR} == 23)}</code> and this would be evaluated as <code>true</code>/<code>false</code>, the result would then be passed to Javascript
         which would then return <code>true</code>/<code>false</code>. If the Variable Expression option is selected, then the expression is evaluated
         and compared with "<code>true</code>", without needing to use Javascript.
         Also, variable expressions can return any value, whereas the
@@ -2299,7 +2297,7 @@ Please refer to the <complink name="Cons
     <property name="Condition (default Javascript)" required="Yes">By default the condition is interpreted as <b>Javascript</b> code that returns "<code>true</code>" or "<code>false</code>",
     but this can be overridden (see below)</property>
     <property name="Interpret Condition as Variable Expression?" required="Yes">If this is selected, then the condition must be an expression that evaluates to "<code>true</code>" (case is ignored).
-    For example, <code>${FOUND}</code> or <code>${__jexl(${VAR} &gt; 100)}</code>.
+    For example, <code>${FOUND}</code> or <code>${__jexl3(${VAR} &gt; 100)}</code>.
     Unlike the Javascript case, the condition is only checked to see if it matches "<code>true</code>" (case is ignored).
     </property>
     <property name="Evaluate for all children" required="Yes">

Modified: jmeter/trunk/xdocs/usermanual/functions.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/functions.xml?rev=1763870&r1=1763869&r2=1763870&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/functions.xml (original)
+++ jmeter/trunk/xdocs/usermanual/functions.xml Sat Oct  8 08:34:00 2016
@@ -190,8 +190,9 @@ The following functions should work OK o
 <li>longSum</li>
 <li>machineName</li>
 <li>BeanShell</li>
+<li>groovy</li>
 <li>javaScript</li>
-<li>jexl</li>
+<li>jexl2/jexl3</li>
 <li>random</li>
 <li>time</li>
 <li>property functions</li>
@@ -226,7 +227,7 @@ be omitted.</p>
 
 <p><b>Argument values that themselves contain commas should be escaped as necessary.
 If you need to include a comma in your parameter value, escape it like so: '<code>\,</code>'.</b>
-This applies for example to the scripting functions - Javascript, Beanshell, Jexl - where it is necessary to escape any commas
+This applies for example to the scripting functions - Javascript, Beanshell, Jexl, groovy - where it is necessary to escape any commas
 that may be needed in script method calls - e.g.
 </p>
 <pre>



Re: svn commit: r1763870 - in /jmeter/trunk: src/core/org/apache/jmeter/util/ src/jorphan/org/apache/commons/jexl/bsf/ test/src/org/apache/jmeter/functions/ xdocs/ xdocs/usermanual/

Posted by Milamber <mi...@apache.org>.

On 08/10/2016 16:27, Felix Schumacher wrote:
> Am 08.10.2016 um 15:20 schrieb Milamber:
>>
>>
>> On 08/10/2016 09:34, pmouawad@apache.org wrote:
>>> + <li><bug>60225</bug>Drop deprecated <code>__jexl</code> function, 
>>> jexl support in BSF and dependency on 
>>> <code>commons-jexl-1.1.jar</code> This function can be easily 
>>> replaced with <code><a 
>>> href="./usermanual/functions.html#__jexl3">__jexl3</a></code> 
>>> function</li>
>>>   </ul>
>>
>> The result html page don't display the __jexl3 function.
>>
>> <li><a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=60225 
>> <view-source:https://bz.apache.org/bugzilla/show_bug.cgi?id=60225>">Bug 
>> 60225</a>- Drop deprecated <tt class="code">__jexl</tt>function, jexl 
>> support in BSF and dependency on <tt 
>> class="code">commons-jexl-1.1.jar</tt>This function can be easily 
>> replaced with <tt class="code"></tt><====== Missing ___jexl3 function 
>> </li>Probably the <a></a> inside the <code></code> don't works?
>
> Right. Should be handled by r1763904

It's works. Thanks Felix!

>
> Regards,
>  Felix
>>
>>
>>
>>
>>
>
>


Re: svn commit: r1763870 - in /jmeter/trunk: src/core/org/apache/jmeter/util/ src/jorphan/org/apache/commons/jexl/bsf/ test/src/org/apache/jmeter/functions/ xdocs/ xdocs/usermanual/

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 08.10.2016 um 15:20 schrieb Milamber:
>
>
> On 08/10/2016 09:34, pmouawad@apache.org wrote:
>> + <li><bug>60225</bug>Drop deprecated <code>__jexl</code> function, 
>> jexl support in BSF and dependency on 
>> <code>commons-jexl-1.1.jar</code> This function can be easily 
>> replaced with <code><a 
>> href="./usermanual/functions.html#__jexl3">__jexl3</a></code> 
>> function</li>
>>   </ul>
>
> The result html page don't display the __jexl3 function.
>
> <li><a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=60225 
> <view-source:https://bz.apache.org/bugzilla/show_bug.cgi?id=60225>">Bug 
> 60225</a>- Drop deprecated <tt class="code">__jexl</tt>function, jexl 
> support in BSF and dependency on <tt 
> class="code">commons-jexl-1.1.jar</tt>This function can be easily 
> replaced with <tt class="code"></tt><====== Missing ___jexl3 function 
> </li>Probably the <a></a> inside the <code></code> don't works?

Right. Should be handled by r1763904

Regards,
  Felix
>
>
>
>
>


Re: svn commit: r1763870 - in /jmeter/trunk: src/core/org/apache/jmeter/util/ src/jorphan/org/apache/commons/jexl/bsf/ test/src/org/apache/jmeter/functions/ xdocs/ xdocs/usermanual/

Posted by Milamber <mi...@apache.org>.

On 08/10/2016 09:34, pmouawad@apache.org wrote:
> +    <li><bug>60225</bug>Drop deprecated <code>__jexl</code> function, jexl support in BSF and dependency on <code>commons-jexl-1.1.jar</code> This function can be easily replaced with <code><a href="./usermanual/functions.html#__jexl3">__jexl3</a></code> function</li>
>   </ul>
>   

The result html page don't display the __jexl3 function.

<li><a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=60225 
<view-source:https://bz.apache.org/bugzilla/show_bug.cgi?id=60225>">Bug 
60225</a>- Drop deprecated <tt class="code">__jexl</tt>function, jexl 
support in BSF and dependency on <tt 
class="code">commons-jexl-1.1.jar</tt>This function can be easily 
replaced with <tt class="code"></tt><====== Missing ___jexl3 function 
</li>Probably the <a></a> inside the <code></code> don't works?