Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 55676 invoked from network); 15 May 2007 10:58:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 May 2007 10:58:37 -0000 Received: (qmail 13464 invoked by uid 500); 15 May 2007 10:58:43 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 13446 invoked by uid 500); 15 May 2007 10:58:43 -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 13437 invoked by uid 99); 15 May 2007 10:58:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 May 2007 03:58:43 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 May 2007 03:58:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 44BD171406A for ; Tue, 15 May 2007 03:58:16 -0700 (PDT) Message-ID: <8066039.1179226696278.JavaMail.jira@brutus> Date: Tue, 15 May 2007 03:58:16 -0700 (PDT) From: "Elena Sayapina (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-3869) [classlib][luni] Compatibility: File("", "") differs on Harmony and RI MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [classlib][luni] Compatibility: File("", "") differs on Harmony and RI ---------------------------------------------------------------------- Key: HARMONY-3869 URL: https://issues.apache.org/jira/browse/HARMONY-3869 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Elena Sayapina Priority: Minor Constructors File(parent, String child) behave differently on Harmony and RI in case of empty pathname parent and empty pathname child. new File("", "").getPath() returns abstract path equals to File.separator while Harmony returns empty abstract path. NOTE that if child is not empty Harmony and RI act the same. Please, consider the following code: import java.io.File; public class CFileTest { public static void main(String[] args) { System.out.println("user.dir: " + System.getProperty("user.dir")); File file1 = new File("", ""); System.out.println("Path 1: " + file1.getPath()); System.out.println("Absolute path 1: " + file1.getAbsolutePath()); File file2 = new File(new File(""), ""); System.out.println("Path 2: " + file2.getPath()); System.out.println("Absolute path 2: " + file2.getAbsolutePath()); File file3 = new File("", "file"); System.out.println("Path 3: " + file3.getPath()); System.out.println("Absolute path 3: " + file3.getAbsolutePath()); } } Output on Harmony-r537771: Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. java version "1.5.0" pre-alpha : not complete or compatible svn = r537771, (May 14 2007), Windows/ia32/msvc 1310, release build http://incubator.apache.org/harmony user.dir: C:\users\evs Path 1: Absolute path 1: C:\users\evs Path 2: Absolute path 2: C:\users\evs Path 3: \file Absolute path 3: C:\file Output on HotSpot: java version "1.5.0_11" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode) user.dir: C:\users\evs Path 1: \ Absolute path 1: C:\ Path 2: \ Absolute path 2: C:\ Path 3: \file Absolute path 3: C:\file Please, use attached CFileTest.java for the test reproducing. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.