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

Hanisha Koneru commented on HADOOP-14788:
-----------------------------------------

Thanks for working on this [~ajayydv].
In the catch clause in _IOUtils#wrapException_, why are we returning a 
{{PathIOException}}? Shouldn't it be an {{IOException}}?
{code}
catch (Exception ex) {
        // For subclasses which have no (String) constructor throw IOException
        // with wrapped message

        return new PathIOException(path, exception);
}
{code}

A tiny nit: In the method description of _wrapException_,  "if exception" 
string is repeated.

> Credentials readTokenStorageFile to stop wrapping IOEs in IOEs
> --------------------------------------------------------------
>
>                 Key: HADOOP-14788
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14788
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.8.1
>            Reporter: Steve Loughran
>            Assignee: Ajay Kumar
>            Priority: Minor
>         Attachments: HADOOP-14788.001.patch, HADOOP-14788.002.patch, 
> HADOOP-14788.003.patch
>
>
> When {{Credentials readTokenStorageFile}} gets an IOE. it catches & wraps 
> with the filename, so losing the exception class information.
> Is this needed. or can it pass everything up?
> If it is needed, well, it's a common pattern: wrapping the exception with the 
> path & operation. Maybe it's time to add an IOE version of 
> {{NetworkUtils.wrapException()}} which handles the broader set of IOEs



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to