[ 
https://issues.apache.org/jira/browse/YARN-2707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gera Shegalov updated YARN-2707:
--------------------------------
    Attachment: YARN-2707.v01.patch

Thanks for reporting this bug, [~yuzhih...@gmail.com]. It turns out that there 
is a test for this but it was not checking Future.get. Future.isDone returns 
true for failed Callables as well.

> Potential null dereference in FSDownload
> ----------------------------------------
>
>                 Key: YARN-2707
>                 URL: https://issues.apache.org/jira/browse/YARN-2707
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Gera Shegalov
>            Priority: Minor
>         Attachments: YARN-2707.v01.patch
>
>
> Here is related code in call():
> {code}
>       Pattern pattern = null;
>       String p = resource.getPattern();
>       if (p != null) {
>         pattern = Pattern.compile(p);
>       }
>       unpack(new File(dTmp.toUri()), new File(dFinal.toUri()), pattern);
> {code}
> In unpack():
> {code}
>         RunJar.unJar(localrsrc, dst, pattern);
> {code}
> unJar() would dereference the pattern without checking whether it is null.



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

Reply via email to