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

Steve Loughran commented on HADOOP-14609:
-----------------------------------------

Looks symptomatic of a broader problem; many of the checks for error code 
values are assuming the code is non-null. They should swap the condition args 
so that the constant string comes first. This is what most of the checks in the 
azure lib does itself

> NPE in AzureNativeFileSystemStore.checkContainer() if StorageException lacks 
> an error code
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-14609
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14609
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/azure
>    Affects Versions: 2.9.0
>            Reporter: Steve Loughran
>
> if something goes wrong in {{AzureNativeFileSystemStore.checkContainer() }} 
> the {{StorageException}} error code is checked.
> {code}
> if (ex.getErrorCode().equals(StorageErrorCode.RESOURCE_NOT_FOUND.toString())) 
> {
>  ...
> }
> But if there's no error code: NPE.



--
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