You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2020/03/04 17:29:01 UTC
[Bug 64198] New: Spaces at the end of ${...}
https://bz.apache.org/bugzilla/show_bug.cgi?id=64198
Bug ID: 64198
Summary: Spaces at the end of ${...}
Product: JMeter
Version: 5.2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P2
Component: Main
Assignee: issues@jmeter.apache.org
Reporter: felix.schumacher@internetallee.de
Target Milestone: JMETER_6.0.0
When JMeter evaluates an expression like "${__groovy(true) }" it will throw an
exception like:
rg.apache.jmeter.functions.InvalidVariableException: Expected } after __groovy
function call in ${__groovy(true) }
at
org.apache.jmeter.engine.util.FunctionParser.makeFunction(FunctionParser.java:135)
~[ApacheJMeter_core.jar:5.3-SNAPSHOT]
at
org.apache.jmeter.engine.util.FunctionParser.compileString(FunctionParser.java:78)
~[ApacheJMeter_core.jar:5.3-SNAPSHOT]
at
org.apache.jmeter.engine.util.CompoundVariable.setParameters(CompoundVariable.java:180)
~[ApacheJMeter_core.jar:5.3-SNAPSHOT]
at
org.apache.jmeter.engine.util.ReplaceStringWithFunctions.transformValue(ReplaceStringWithFunctions.java:42)
~[ApacheJMeter_core.jar:5.3-SNAPSHOT]
at
org.apache.jmeter.engine.util.ValueReplacer.replaceValues(ValueReplacer.java:169)
~[ApacheJMeter_core.jar:5.3-SNAPSHOT]
at
org.apache.jmeter.engine.util.ValueReplacer.replaceValues(ValueReplacer.java:79)
~[ApacheJMeter_core.jar:5.3-SNAPSHOT]
at org.apache.jmeter.engine.PreCompiler.addNode(PreCompiler.java:88)
[ApacheJMeter_core.jar:5.3-SNAPSHOT]
at
org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:993)
[jorphan.jar:5.3-SNAPSHOT]
at
org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:994)
[jorphan.jar:5.3-SNAPSHOT]
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:976)
[jorphan.jar:5.3-SNAPSHOT]
at
org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:361)
[ApacheJMeter_core.jar:5.3-SNAPSHOT]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
If the expression is used without the space before the closing brace like
"${__groovy(true)}" it works as expected.
I think that we should be more forgiving here and ignore spaces before the
closing brace.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64198] Spaces at the end of ${...}
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64198
Felix Schumacher <fe...@internetallee.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Keywords| |FixedInTrunk
--- Comment #3 from Felix Schumacher <fe...@internetallee.de> ---
commit 89ed2ef64bea7a082171ea8dcc1c9cb1a2e302bf
AuthorDate: Thu Mar 5 21:35:20 2020 +0100
Allow spaces in ${...} expressions around function calls.
With this change it is possible to write
${ __P(something, 1) }
where such an expression would previously have resulted in an error.
Bugzilla Id: 64198
---
.../apache/jmeter/engine/util/FunctionParser.java | 14 ++++-
.../jmeter/engine/util/FunctionParserSpec.groovy | 62 ++++++++++++++++++++++
xdocs/changes.xml | 1 +
3 files changed, 75 insertions(+), 2 deletions(-)
diff --git a/src/core/src/main/java/org/apache/jmeter/engine
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64198] Spaces at the end of ${...}
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64198
Felix Schumacher <fe...@internetallee.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #37063|0 |1
is obsolete| |
--- Comment #2 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 37065
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37065&action=edit
Allow spaces around function expressions
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64198] Spaces at the end of ${...}
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64198
--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 37063
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37063&action=edit
Skip spaces before a matching closing brace
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64198] Spaces at the end of ${...}
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64198
Felix Schumacher <fe...@internetallee.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
--
You are receiving this mail because:
You are the assignee for the bug.