hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12726) Unsupported operations should throw UnsupportedOperationException
Date Tue, 26 Jan 2016 15:02:39 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-12726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117344#comment-15117344
] 

Steve Loughran commented on HADOOP-12726:
-----------------------------------------

This wont be incompatible, provided the exception is an IOE. If you use java.lang.UnsupportedOperationException,
things would break, so your patch wouldn't get in



> Unsupported operations should throw UnsupportedOperationException
> -----------------------------------------------------------------
>
>                 Key: HADOOP-12726
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12726
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>    Affects Versions: 2.7.1
>            Reporter: Daniel Templeton
>            Assignee: Daniel Templeton
>
> In the {{FileSystem}} implementation classes, unsupported operations throw {{new IOException("Not
supported")}}, which makes it needlessly difficult to distinguish an actual error from an
unsupported operation.  They should instead throw {{new UnsupportedOperationException()}}.
> It's possible that this anti-idiom is used elsewhere in the code base.  This JIRA should
include finding and cleaning up those instances as well.



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

Mime
View raw message