title: How to fix Findbugs security warning for 'Potential Path Traversal (File Read)'
body: <p>I'm getting above warning with 'Method java.io.File reads a file whose location is specified by user input' message after running findbugs in the below code snippet.</p>
  
  <pre><code>public void removeFile(String warfileName){
      File warFile = new File(homePath + "/samples/" + warFileName + ".war");
  .....
  }
  </code></pre>
  
  <p>What would be the best way of fixing this security isssue? </p>