svn merge -c 1309572 from trunk. FIXES HADOOP-8179. risk of NPE in CopyCommands processArguments() (Daryn Sharp via bobby)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1309573 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Joseph Evans 2012-04-04 19:54:14 +00:00
parent 3c7d74132b
commit 764453c81f
2 changed files with 4 additions and 2 deletions

View File

@ -278,6 +278,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
NEW FEATURES

View File

@ -81,10 +81,9 @@ class CopyCommands {
}
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"));