milamberspace commented on code in PR #6726:
URL: https://github.com/apache/jmeter/pull/6726#discussion_r3602560068
##########
src/components/src/main/java/org/apache/jmeter/config/CSVDataSet.java:
##########
@@ -239,7 +239,11 @@ private static void trimVarNames(String[] varsNames) {
* @return Returns the filename.
*/
public String getFilename() {
- return filename;
+ if (filename != null) {
+ return filename;
+ }
+ JMeterProperty property = getPropertyOrNull("filename");
Review Comment:
**Minor / non-blocking (scope note):** the sibling getters on this TestBean
— `getFileEncoding()`, `getVariableNames()`, `getDelimiter()`,
`getShareMode()`, and the boolean getters — all return their `transient` field
directly and would exhibit the same `null`-after-`loadTree()` behaviour this PR
fixes for `filename`. Keeping this PR scoped to `filename` (the subject of
#6451) is perfectly reasonable; just flagging it as a possible follow-up so the
pattern is fixed consistently later.
(Tiny aside, not a request: after an explicit `setFilename(null)` on a
loaded element, `getFilename()` will now return the property value rather than
`null` — an unlikely usage with no real-world impact.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]