You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2009/05/07 16:17:13 UTC

svn commit: r772655 - in /jakarta/jmeter/trunk: src/core/org/apache/jmeter/engine/util/FunctionParser.java xdocs/changes.xml

Author: sebb
Date: Thu May  7 14:17:13 2009
New Revision: 772655

URL: http://svn.apache.org/viewvc?rev=772655&view=rev
Log:
A reference to a missing function - e.g. ${__missing(a)} - is now treated the same as a missing variable. Previously the function name - and leading { - were dropped.

Modified:
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/util/FunctionParser.java
    jakarta/jmeter/trunk/xdocs/changes.xml

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/util/FunctionParser.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/util/FunctionParser.java?rev=772655&r1=772654&r2=772655&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/util/FunctionParser.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/util/FunctionParser.java Thu May  7 14:17:13 2009
@@ -129,7 +129,6 @@
                 } else if (current[0] == '(' && previous != ' ') {
                     String funcName = buffer.toString();
                     function = CompoundVariable.getNamedFunction(funcName);
-                    buffer.setLength(0);
                     if (function instanceof Function) {
                         ((Function) function).setParameters(parseParams(reader));
                         if (reader.read(current) == 0 || current[0] != '}') {
@@ -143,6 +142,8 @@
                             StandardJMeterEngine.register((TestListener) function);
                         }
                         return function;
+                    } else { // Function does not exist, so treat as per missing variable
+                        buffer.append(current[0]);
                     }
                     continue;
                 } else if (current[0] == '}') {// variable, or function with no parameter list

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=772655&r1=772654&r2=772655&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Thu May  7 14:17:13 2009
@@ -210,6 +210,7 @@
 <li>Bug 47120 -  Throughput Controller: change percent executions to total executions, the value is stored in a String and interpreted as 1 execution</li>
 <li>Bug 47137 - Labels in View Results Tree aren't I18N</li>
 <li>Bug 47150 - ThreadGroup with a loop count of zero causes infinite loop</li>
+<li>A reference to a missing function - e.g. ${__missing(a)} - is now treated the same as a missing variable. Previously the function name - and leading { - were dropped.</li>
 </ul>
 
 <h3>Improvements</h3>



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org