Created attachment 31936 [details] csv_dataset.patch 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.
Maybe this is better be fixed in org.apache.jmeter.services.FileServer class to have the effect everywhere.
Created attachment 31939 [details] TestBeanHelper&GenericTestBeanCustomizer I've made some more research and tried to fixed this issue for all String properties wherever they occur.
I think the fix of last patch is too coarse and impacting as it hits much more than simple path in Beans.
Third variant is to fix CSVDataSet and TCLogParser, because they both reserve files using FilerServer. In this case patch may look like latest one in attachement.
Created attachment 31940 [details] CSVDataSet&TCLogParser
Hello, Thanks for contribution. To be clean, I think we should look at all elements that use FileNames and add trimming (not only to 2 elements). Also, for cleanness, I suggest setter are not modified, only the code that uses fileName should trim it.
(In reply to Philippe Mouawad from comment #6) > To be clean, I think we should look at all elements that use FileNames and > add trimming (not only to 2 elements). Agree. But here is a little dilemma for me: either to fix two elements(which use FileServer, CSVDataSet&TCLogParser), or make deep fix, which you've already rejected(trimm all StringProperties in TestBeanHelper&GenericTestBeanCustomizer). Do you know any intermediate variant? >Also, for cleanness, I suggest setter are not modified, only the code that uses >fileName should trim it. I think, it could be better to trim filename higher than fileserver level, because filename is used also as alias. In this case we'll do far less changes in code.
Hi, I rejected the trim on all StringProperties in TestBeanHelper&GenericTestBeanCustomizer as it would have affected also non filenames which may have side effects for existing plans. The best thing IMHO is to review all components that have filenames and trim spaces for them. It is more work but I think it is more coherent. Regards
Hi, I would like to know if you think it's need to be fixed? Because have spaces at the begin or/and at the end of a file is authorized (tested in Windows + Linux), I don't know what it needed to do Do you think the issue must be closed? If not, I will split it in separate issue and fix them one by one Antonio
Hi Antonio, if you can take into account my previous comment, then yes a PR is welcome. Regards
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3420