Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 9451 invoked from network); 14 Apr 2009 06:49:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Apr 2009 06:49:37 -0000 Received: (qmail 78287 invoked by uid 500); 14 Apr 2009 06:49:37 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 78209 invoked by uid 500); 14 Apr 2009 06:49:37 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 77949 invoked by uid 99); 14 Apr 2009 06:49:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2009 06:49:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2009 06:49:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 437D5234C003 for ; Mon, 13 Apr 2009 23:49:15 -0700 (PDT) Message-ID: <1592537160.1239691755262.JavaMail.jira@brutus> Date: Mon, 13 Apr 2009 23:49:15 -0700 (PDT) From: "Regis Xu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-6126) [classlib][luni] - remove unnecessary code in java.io.File In-Reply-To: <2030200627.1237878590442.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-6126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Regis Xu resolved HARMONY-6126. ------------------------------- Resolution: Fixed Fix Version/s: 5.0M9 committed to svn repository at r764686 > [classlib][luni] - remove unnecessary code in java.io.File > ---------------------------------------------------------- > > Key: HARMONY-6126 > URL: https://issues.apache.org/jira/browse/HARMONY-6126 > Project: Harmony > Issue Type: Improvement > Components: Classlib > Affects Versions: 5.0M8 > Reporter: Regis Xu > Fix For: 5.0M9 > > Attachments: HARMONY-6126.diff > > > two places: > 1. in fixSlashes: > > String tempPath = new String(newPath, 0, newLength); > // If it's the same keep it identical for SecurityManager purposes > if (!tempPath.equals(origPath)) { > return tempPath; > } > return origPath; > > could be simplified: > > return new String(newPath, 0, newLength); > > 2. in properPath: > > if ((properPath = properPathImpl(pathBytes)) != null) { > return properPath; > } > > on Linux, properPathImpl just return null; on Windows, it will return not null only when the path is absolute, > but before above code segment, there is code: > > if (isAbsoluteImpl(pathBytes)) { > return properPath = pathBytes; > } > > so properPathImpl always return null, can be safely removed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.