[ https://issues.apache.org/jira/browse/HDFS-14472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ayush Saxena resolved HDFS-14472. --------------------------------- Resolution: Not A Problem > FSImageHandler.getPath() throws a FileNotFoundException when the path is > malformed > ---------------------------------------------------------------------------------- > > Key: HDFS-14472 > URL: https://issues.apache.org/jira/browse/HDFS-14472 > Project: Hadoop HDFS > Issue Type: Sub-task > Reporter: eBugs > Priority: Minor > > Dear HDFS developers, we are developing a tool to detect exception-related > bugs in Java. Our prototype has spotted the following {{throw}} statement > whose exception class and error message indicate different error conditions. > > Version: Hadoop-3.1.2 > File: > HADOOP-ROOT/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/FSImageHandler.java > Line: 179-180 > {code:java} > throw new FileNotFoundException("Path: " + path + " should " + > "start with " + WEBHDFS_PREFIX);{code} > > A {{FileNotFoundException}} means that a target file cannot be found. > However, the error message indicates that the path is malformed (instead of > well-formed but pointing to no file). This mismatch could be a problem. For > example, the callers trying to handle other {{FileNotFoundException}} may > accidentally (and incorrectly) handle the malformed path. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org