title: FileInputStream not throwing FileNotFoundException as documented?
body: <p>The constructor <code>FileInputStream(String name)</code> of the <code>java.io.FileInputStream</code> class declares that it throws a <code>FileNotFoundException</code>, and it states in its javadoc:</p>
  
  <blockquote>
    <p>If the named file <strong>does not exist</strong>, is a directory rather than a regular file, or for some other reason cannot be opened for reading then a <code>FileNotFoundException</code> is thrown.</p>
  </blockquote>
  
  <p>However, invoking it with a name of a non-existent file doesn't cause any exceptions to be thrown:</p>
  
  <pre><code>@Test(expected = FileNotFoundException.class)
  public void nonExistentFileThrowsFileNotFoundException() throws FileNotFoundException {
      new FileInputStream("this file totally doesnt exist");
  }
  </code></pre>
  
  <p>This test fails - no exceptions are thrown. Looking at the code of the constructor, it is clear that no exceptions should be thrown - it is merely invoking the <code>java.io.File</code> constructor:</p>
  
  <pre><code>public FileInputStream(String name) throws FileNotFoundException {
      this(name != null ? new File(name) : null);
  }
  </code></pre>
  
  <p>Is this a design/documentation flaw? In my view, the <code>FileInputStream</code> constructor should neither declare a <code>throws FileNotFoundException</code>, nor should its javadoc state that it throws. What gives?</p>