Bug 61771

Summary: SwitchController : Switch field should be trimmed by safety
Product: JMeter Reporter: Philippe Mouawad <p.mouawad>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement CC: p.mouawad
Priority: P2    
Version: 3.3   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Philippe Mouawad 2017-11-16 22:19:07 UTC
If you introduce by error a space at end of before the switch value, it can be hard to find the problem for the concerned switch.

I see no reason why a space would be here.

So I suggest we do a trim on field.
Comment 1 Graham Russell 2017-11-16 22:48:53 UTC
I agree, it is much more likely that trailing whitespace is a mistake, so should be the default to trim, as long as it's documented.
Comment 2 Philippe Mouawad 2018-01-06 21:22:27 UTC
Author: pmouawad
Date: Sat Jan  6 21:21:42 2018
New Revision: 1820422

URL: http://svn.apache.org/viewvc?rev=1820422&view=rev
Log:
Bug 61771 - SwitchController : Switch field should be trimmed by safety
Bugzilla Id: 61771

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/control/SwitchController.java
    jmeter/trunk/xdocs/changes.xml
Author: pmouawad
Date: Sat Jan  6 21:22:05 2018
New Revision: 1820423

URL: http://svn.apache.org/viewvc?rev=1820423&view=rev
Log:
Bug 61771 - SwitchController : Switch field should be trimmed by safety
Add tests
Bugzilla Id: 61771

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/control/TestSwitchController.java