HADOOP-8179. risk of NPE in CopyCommands processArguments() (Daryn Sharp via bobby)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1309572 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Joseph Evans 2012-04-04 19:53:09 +00:00
parent 1b93f8e5c3
commit fcacb14a1e
2 changed files with 4 additions and 2 deletions

View File

@ -386,6 +386,9 @@ Release 0.23.3 - UNRELEASED
HADOOP-8088. User-group mapping cache incorrectly does negative caching on
transient failures (Khiwal Lee via bobby)
HADOOP-8179. risk of NPE in CopyCommands processArguments() (Daryn Sharp
via bobby)
Release 0.23.2 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -81,10 +81,9 @@ protected void processArguments(LinkedList<PathData> items)
}
FSDataOutputStream out = dst.fs.create(dst.path);
try {
FSDataInputStream in = null;
for (PathData src : srcs) {
FSDataInputStream in = src.fs.open(src.path);
try {
in = src.fs.open(src.path);
IOUtils.copyBytes(in, out, getConf(), false);
if (delimiter != null) {
out.write(delimiter.getBytes("UTF-8"));