drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deneche A. Hakim (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-2359) ClassPathFileSystem.getFileStatus() should throw FileNotFoundException when path doesn't exist
Date Tue, 03 Mar 2015 00:03:07 GMT
Deneche A. Hakim created DRILL-2359:
---------------------------------------

             Summary: ClassPathFileSystem.getFileStatus() should throw FileNotFoundException
when path doesn't exist
                 Key: DRILL-2359
                 URL: https://issues.apache.org/jira/browse/DRILL-2359
             Project: Apache Drill
          Issue Type: Bug
    Affects Versions: 0.8.0
            Reporter: Deneche A. Hakim


{{ClassPathFileSystem.getFileStatus(Path args0)}} throws {{IOException}} when the path doesn't
exist. It should throw {{FileNotFoundException}} instead. One particular method that fails
to work correctly because of this is {{org.apache.hadoop.FileSystem.exists(Path f)}}:
{code}
public boolean exists(Path f) throws IOException {
    try {
      return getFileStatus(f) != null;
    } catch (FileNotFoundException e) {
      return false;
    }
  }
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message