CSVDataSet does not trim spaces in <filename>.csv
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
**Dzmitry Kashlach** ([Bug 56877](https://bz.apache.org/bugzilla//show_bug.cgi?id=56877&redirect=false)):
CSVDataSet does not trim spaces in <filename>.csv
E.g. if user entered in text-box "<filename>.csv ", then filename will be set as
"<filename>.csv " but not "<filename>.csv".
I suggest simple patch for it.
Created attachment [csv_dataset.patch](https://apache.github.io/jmeter-bugzilla-attachments/77/56877/31936/csv_dataset.patch): csv_dataset.patch
csv_dataset.patch
````diff
Index: src/components/org/apache/jmeter/config/CSVDataSet.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/components/org/apache/jmeter/config/CSVDataSet.java (revision 25897c69d454701793f8506bb7680bb115190eb2)
+++ src/components/org/apache/jmeter/config/CSVDataSet.java (revision )
@@ -226,7 +226,7 @@
* The filename to set.
*/
public void setFilename(String filename) {
- this.filename = filename;
+ this.filename = filename.trim();
}
/**
````
OS: All
Contributor guide
Assessment
This issue has not been assessed yet.