title: Java endsWith() not working as expected
body: <p>I'm probably just overlooking something obvious, but I can't for the life of me figure out why this section of code is not working.</p>
  
  <pre><code>if(txtFileLocation.toString().toLowerCase().endsWith(".twn")){
              file = new File(txtFileLocation.getText());
          } else {
              file = new File(txtFileLocation.getText() + ".twn");
              System.out.println(txtFileLocation.getText() + " didn't end in .twn, so appending it");
          }
          System.out.println(file.getPath());
  </code></pre>
  
  <p>The output is as followers:</p>
  
  <pre><code>C:\temp\netprimaries1.twn didn't end in .twn, so appending it 
  C:\temp\netprimaries1.twn.twn
  </code></pre>
  
  <p>Why doesn't endsWith(".twn") return true?</p>