https://bz.apache.org/bugzilla/show_bug.cgi?id=63522

Vladimir Sitnikov <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Vladimir Sitnikov <[email protected]> ---
Are you sure it is a bug?
I would say it is a feature :)

Technically speaking, JMeter does not make ${__intSum(5,i_counter)} a new
language feature of JSR223 languages.
In other words, ${__intSum(5,i_counter)}  might easily be an invalid Groovy (or
JavaScript or whatever) code.

In other words, the execution sequence is:
1) JMeter takes "code to execute" as a string
2) It evaluates all ${...} macros there and replaces them with appropriate
values
3) The resulting string is passed to a JSR223 language for interpretation

Note: at step #2 JMeter has absolutely no idea on what syntax is used in
JSR223. In other words, only Groovy engine can tell if the particular line is a
comment, or it is just a part of a multi-line string.

Note 2: it is recommended to AVOID use of ${...} in JSR223 scripts as those
force JMeter to re-evaluate the script code, and the underlying JSR223 engine
has to reparse the code again.


I think it might make sense to just forbid use of JMeter's ${...} macros in
JSR223 code blobs (e.g. disable it by default and allow to temporary override
that).

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to