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

zhihai xu commented on HADOOP-12252:
------------------------------------

[~xgong], Could you review the patch? Because the arrays {{dirDF}} and 
{{localDirs}} are not initialized, NPE will happen when accessing the arrays' 
length at above corner case. The fix is to initialize {{dirDF}} and 
{{localDirs}} as zero length array, which should be safe I think. thanks

> LocalDirAllocator should not throw NPE with empty string configuration. 
> ------------------------------------------------------------------------
>
>                 Key: HADOOP-12252
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12252
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: zhihai xu
>            Assignee: zhihai xu
>         Attachments: HADOOP-12252.000.patch
>
>
> LocalDirAllocator should not throw NPE with empty string configuration. When 
> an empty string is configured, {{LocalDirAllocator}} will throw NPE. It will 
> be better to throw IOException instead of NPE.



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

Reply via email to