Github user vlsi commented on a diff in the pull request:

    https://github.com/apache/jmeter/pull/167#discussion_r56465359
  
    --- Diff: src/core/org/apache/jmeter/services/FileServer.java ---
    @@ -418,16 +418,20 @@ private BufferedReader getReader(String alias, 
boolean recycle, boolean firstLin
         }
     
         private BufferedReader createBufferedReader(FileEntry fileEntry) 
throws IOException {
    -        FileInputStream fis = new FileInputStream(fileEntry.file);
    -        InputStreamReader isr = null;
    -        // If file encoding is specified, read using that encoding, 
otherwise use default platform encoding
    -        String charsetName = fileEntry.charSetEncoding;
    -        if(!JOrphanUtils.isBlank(charsetName)) {
    -            isr = new InputStreamReader(fis, charsetName);
    +        if (!fileEntry.file.exists() || !fileEntry.file.canRead() || 
!fileEntry.file.isFile()) {
    +            throw new IllegalArgumentException("File "+ 
fileEntry.file.getName()+ " must exist and be readable");
             } else {
    --- End diff --
    
    Please remove `else` and the following braces.
    It would avoid indenting the following code.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to