Does Java getResource method only work with particular extensions?
<p>The following piece of code works fine</p>

<pre><code>getClass().getResource("/index.xml");
</code></pre>

<p>However when I do a full refactor to </p>

<pre><code>getClass().getResource("/index.html");
</code></pre>

<p>The above line throws NullPointerException.  I know I have refactored correctly because I rename the file using IDE smart refactor i.e. the file index.html definitely exists in the same directory.  As soon as I switch back to</p>

<pre><code>getClass().getResource("/index.xml");
</code></pre>

<p>Everything is fine again.  Is there any reason why only the .xml extension works?</p>
