title: null pointer (java.io.File) exception dissappears while debugging
body: <p>I have an application which throws this error (happens only with xlsx-files):</p>
  
  <pre><code>java.lang.NullPointerException
  at java.io.File.&lt;init&gt;(File.java:222)
  at de.mpicbg.tds.core.ExcelLayout.openWorkbook(ExcelLayout.java:75)
  </code></pre>
  
  <p>The method 'openWorkbook' looks like this:</p>
  
  <pre><code>    private void openWorkbook() throws IOException {
      File excelFile = new File(fileName);
  
      timestamp = excelFile.lastModified();
  
      // open excel file
      if (fileName.endsWith(".xlsx")) {
          InputStream excelStream = new BufferedInputStream(new FileInputStream(excelFile));
          this.workbook = new XSSFWorkbook((excelStream));
  
      } else {
          this.workbook = new HSSFWorkbook(new POIFSFileSystem(new FileInputStream(excelFile)));
      }
  }
  </code></pre>
  
  <p>If I execute everything in debug mode, everything goes smoothly and the error message does not appear. I don't have any explanation for this behaviour nor any idea how to fix it.
  Can anybody help?</p>