title: In the following method i am getting the findbug violation RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
body: <pre><code>public File moveFileToUploadLoc(final File dir) throws Exception {
      File fileToMove = null;
      if (dir != null) {
          final File[] files = dir.listFiles();
          for (int i = 0; files != null &amp;&amp; i &lt; files.length; i++) {
          if (files[i].getName().endsWith("abcd")) {
                      fileToMove = files[i];
  
                      File destnFile = this.getFilePathFrmConfigRepo(this
                              .getFilePathKey());
                      fileToMove.renameTo(destinationFile);
  
                      break;
                  }
              }
          }
  
          return fileToMove;
      }
  </code></pre>
  
  <p>it suggests that
  RV_RETURN_VALUE_IGNORED_BAD_PRACTICE</p>
  
  <blockquote>
    <p>This method returns a value that is not checked. The return value should be checked since it can indicate an unusual or unexpected function execution. For example, the File.delete() method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value.</p>
  </blockquote>