Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 09C3199E9 for ; Wed, 4 Apr 2012 19:54:38 +0000 (UTC) Received: (qmail 3297 invoked by uid 500); 4 Apr 2012 19:54:38 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 3239 invoked by uid 500); 4 Apr 2012 19:54:38 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 3231 invoked by uid 99); 4 Apr 2012 19:54:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2012 19:54:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2012 19:54:36 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 55E92238896F; Wed, 4 Apr 2012 19:54:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1309573 - in /hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common: CHANGES.txt src/main/java/org/apache/hadoop/fs/shell/CopyCommands.java Date: Wed, 04 Apr 2012 19:54:15 -0000 To: common-commits@hadoop.apache.org From: bobby@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120404195415.55E92238896F@eris.apache.org> Author: bobby Date: Wed Apr 4 19:54:14 2012 New Revision: 1309573 URL: http://svn.apache.org/viewvc?rev=1309573&view=rev Log: svn merge -c 1309572 from trunk. FIXES HADOOP-8179. risk of NPE in CopyCommands processArguments() (Daryn Sharp via bobby) Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CopyCommands.java Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1309573&r1=1309572&r2=1309573&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt Wed Apr 4 19:54:14 2012 @@ -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 Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CopyCommands.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CopyCommands.java?rev=1309573&r1=1309572&r2=1309573&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CopyCommands.java (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CopyCommands.java Wed Apr 4 19:54:14 2012 @@ -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"));