jmeter-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 62878] New: includecontroller.prefix fails when path separator not added
Date Fri, 02 Nov 2018 00:49:41 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=62878

            Bug ID: 62878
           Summary: includecontroller.prefix fails when path separator not
                    added
           Product: JMeter
           Version: 4.0
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: adb20@hotmail.com
  Target Milestone: JMETER_5.1

Specifying the includecontroller.prefix fails if the property or the specified
include filename don't end/start with a path separator.

For example:
includecontroller.prefix=/path/to/fragments
Include Controller filename = myfragment.jmx
results in the log message:
\"/path/to/fragmentsmyfragment.jmx\" not found for Include Controller \"Include
Controller - My Fragment\"

This is due to the string append used in IncludeController.java:

String fileName=prefix+includePath;
File file = new File(fileName);

Suggest the code be amended to:

File file = Paths.get(prefix, includePath).toFile();

This way, the user input is handled gracefully. This assumes that the prefix is
a directory.

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message