Bug 62478 - Jmeter function problem Cannot handle comma
Summary: Jmeter function problem Cannot handle comma
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 4.0
Hardware: PC All
: P2 minor (vote)
Target Milestone: JMETER_5.0
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2018-06-21 09:17 UTC by blue414
Modified: 2018-09-05 15:32 UTC (History)
1 user (show)



Attachments
bug (49.89 KB, image/png)
2018-06-21 09:17 UTC, blue414
Details

Note You need to log in before you can comment on or make changes to this bug.
Description blue414 2018-06-21 09:17:31 UTC
Created attachment 35976 [details]
bug

When the input string contains the comma "," the function does not work, probably because the comma "," of the string conflicts with the comma of the parameter
Comment 1 Felix Schumacher 2018-06-21 09:58:39 UTC
The use of commata is documented at
http://jmeter.apache.org/usermanual/functions.html#functions

Patches to the documentation to make it more clear are always welcome.
Comment 2 blue414 2018-06-22 03:35:11 UTC
I modified this code in functionHelper.java "functionCall.append(arg.getValue().replace(",","\\,"));" solved the problem
Comment 3 Felix Schumacher 2018-06-22 04:21:16 UTC
OK. I misunderstood you.

You are right. The parameters taken from the dialog should be escaped. 

Thanks for the insistence.
Comment 4 Felix Schumacher 2018-06-23 12:09:12 UTC
Thanks for the report. Will be fixed in JMeter v4.1.

It would be great, if you could test the next nightly, if it fixes your problem.

Date: Sat Jun 23 12:07:10 2018
New Revision: 1834192

URL: http://svn.apache.org/viewvc?rev=1834192&view=rev
Log:
Escape commata in parameters when constructing function strings in the GUI function helper.

Bugzilla Id: 62478

Added:
    jmeter/trunk/test/src/org/apache/jmeter/functions/gui/
    jmeter/trunk/test/src/org/apache/jmeter/functions/gui/FunctionHelperSpec.groovy   (with props)
Modified:
    jmeter/trunk/src/core/org/apache/jmeter/functions/gui/FunctionHelper.java
    jmeter/trunk/xdocs/changes.xml
Comment 5 blue414 2018-06-25 02:51:14 UTC
:)