Bug 51988

Summary: CSV Data Set Configuration does not resolve default delimiter for header parsing when variables field is empty
Product: JMeter - Now in Github Reporter: Roman Bargezi <rbargezi>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: minor CC: a.versluis, p.mouawad
Priority: P2    
Version: Nightly (Please specify date)   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Proposed patch
Test Plan
CSV file for Test plan
Test plan

Description Roman Bargezi 2011-10-07 10:17:49 UTC
Build CSVDataSet.java 1091505 4/12/11

When not specifying a delimiter the default delimiter for data lines is ",". For the header lines, this default is not used which results in an StringIndexOutOfBoundsException
Comment 1 Roman Bargezi 2011-10-07 10:38:51 UTC
Created attachment 27717 [details]
Proposed patch
Comment 2 Philippe Mouawad 2011-10-07 11:02:24 UTC
Created attachment 27718 [details]
Test Plan
Comment 3 Philippe Mouawad 2011-10-07 11:02:59 UTC
Created attachment 27719 [details]
CSV file for Test plan

Will generate exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
	at java.lang.String.charAt(String.java:686)
	at org.apache.jmeter.config.CSVDataSet.iterationStart(CSVDataSet.java:125)
	at org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:373)
	at org.apache.jmeter.control.GenericController.fireIterEvents(GenericController.java:359)
	at org.apache.jmeter.control.GenericController.next(GenericController.java:131)
	at org.apache.jmeter.control.LoopController.next(LoopController.java:108)
	at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:75)
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268)
	at java.lang.Thread.run(Thread.java:680)
Comment 4 Philippe Mouawad 2011-10-07 11:08:03 UTC
Created attachment 27720 [details]
Test plan
Comment 5 Philippe Mouawad 2011-10-07 11:11:40 UTC
Thanks, fix applied.
Next time please submit a Test plan that illustrates the issue.


Modified:
   jakarta/jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java
   jakarta/jmeter/trunk/xdocs/changes.xml


Regards.
Philippe.
Comment 6 Philippe Mouawad 2011-10-07 18:57:47 UTC
*** Bug 51986 has been marked as a duplicate of this bug. ***
Comment 7 The ASF infrastructure team 2022-09-24 20:37:47 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2586