title: Possible null pointer dereference in SONAR
body: <p>I have tried to point critical issues in Sonar with the following code:</p>
  
  <pre><code>if (candidate.isDirectory() &amp;&amp; candidate.canRead() &amp;&amp; 
            TEMPLATE.equalsIgnoreCase(candidate.getName())) {  
    List&lt;String&gt; fileContentList = Arrays.asList(candidate.list());
  </code></pre>
  
  <p>I have also done the change below, but it still didn't work</p>
  
  <pre><code>if(null != Arrays.asList(candidate.list())){
    List&lt;String&gt; fileContentList = Arrays.asList(candidate.list());}
  </code></pre>
  
  <p>Please help.</p>