Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 17958 invoked from network); 21 Oct 2009 15:40:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Oct 2009 15:40:56 -0000 Received: (qmail 9135 invoked by uid 500); 21 Oct 2009 15:40:56 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 9047 invoked by uid 500); 21 Oct 2009 15:40:56 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 9038 invoked by uid 99); 21 Oct 2009 15:40:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 15:40:56 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 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, 21 Oct 2009 15:40:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D85AE2388981; Wed, 21 Oct 2009 15:40:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r828060 - /commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/Path.java Date: Wed, 21 Oct 2009 15:40:33 -0000 To: commits@commons.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091021154033.D85AE2388981@eris.apache.org> Author: mturk Date: Wed Oct 21 15:40:33 2009 New Revision: 828060 URL: http://svn.apache.org/viewvc?rev=828060&view=rev Log: Allow null parents Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/Path.java Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/Path.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/Path.java?rev=828060&r1=828059&r2=828060&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/Path.java (original) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/Path.java Wed Oct 21 15:40:33 2009 @@ -147,9 +147,12 @@ public Path(String parent, String child) throws NullPointerException, IllegalArgumentException { - if (parent == null || child == null) + if (child == null) throw new NullPointerException(); - path = merge(parent, child, true); + if (parent == null) + path = normal(child); + else + path = merge(parent, child, true); } /** @@ -179,9 +182,12 @@ public Path(Path parent, String child) throws NullPointerException, IllegalArgumentException { - if (parent == null || child == null) + if (child == null) throw new NullPointerException(); - path = merge(parent.path, child, false); + if (parent == null) + path = normal(child); + else + path = merge(parent.path, child, false); } /**