hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jian He (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-1762) Potential NPE in distributedshell Client#run()
Date Fri, 01 May 2015 23:45:06 GMT

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

Jian He commented on YARN-1762:
-------------------------------

bq. addToLocalResources() writes resources, null in the above case, through DataOutputStream#writeUTF().
This is a valid point. But, in reality,  the addToLocalResources won't be called if resources==null.
  
close this

> Potential NPE in distributedshell Client#run()
> ----------------------------------------------
>
>                 Key: YARN-1762
>                 URL: https://issues.apache.org/jira/browse/YARN-1762
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Ted Yu
>
> In hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/Client.java
:
> {code}
>     addToLocalResources(fs, appMasterJar, appMasterJarPath, appId.getId(),
>         localResources, null);
> {code}
> addToLocalResources() writes resources, null in the above case, through DataOutputStream#writeUTF().
> According to http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/io/DataOutputStream.java#DataOutputStream.writeUTF%28java.lang.String%2Cjava.io.DataOutput%29
, str.length() would be called on the null parameter.



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

Mime
View raw message