Bug 53804 - FileServer should fix hasHeader setting when creating an alias
Summary: FileServer should fix hasHeader setting when creating an alias
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.9
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-31 13:13 UTC by Sebb
Modified: 2017-01-23 15:27 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2012-08-31 13:13:27 UTC
One of the FileServer#reserveFile() methods allows the user to specify that a file has a header line, in which case it is returned. [The others don't allow a header]

However, when reading a headed file later, the user has to remember to provide the correct parameter to readLine.

This is a recipe for confusion.

The reserveFile() methods should save the header status of the file entry when it is created.

This should then be used by the the readLine() methods, which should not need to be told the header status.

However, changing this might possibly break some 3rd party code.
So perhaps the safest would be to deprecate the following method:

readLine(String filename, boolean recycle, boolean firstLineIsNames)

and log a warning (or error?) if the reading mode disagrees with the reservation mode.
Comment 1 Sebb 2012-09-13 22:46:21 UTC
Likewise, the recycle setting should be fixed when reserving the file.