beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (BEAM-1760) Potential null dereference in HDFSFileSink#doFinalize
Date Mon, 03 Apr 2017 17:23:42 GMT

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

Ted Yu resolved BEAM-1760.
--------------------------
       Resolution: Later
         Assignee: Davor Bonaci  (was: Ted Yu)
    Fix Version/s: Not applicable

> Potential null dereference in HDFSFileSink#doFinalize
> -----------------------------------------------------
>
>                 Key: BEAM-1760
>                 URL: https://issues.apache.org/jira/browse/BEAM-1760
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Ted Yu
>            Assignee: Davor Bonaci
>            Priority: Minor
>             Fix For: Not applicable
>
>
> Here is related code:
> {code}
>       for (FileStatus s : statuses) {
>         String name = s.getPath().getName();
>         int pos = name.indexOf('.');
>         String ext = pos > 0 ? name.substring(pos) : "";
>         fs.rename(
>             s.getPath(),
>             new Path(s.getPath().getParent(), String.format("part-r-%05d%s", i, ext)));
>         i++;
>       }
>     }
> {code}
> We should check whether s.getPath().getParent() is null.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message