From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23919 invoked by alias); 6 Apr 2002 23:46:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 23828 invoked by uid 71); 6 Apr 2002 23:46:00 -0000 Resent-Date: 6 Apr 2002 23:46:00 -0000 Resent-Message-ID: <20020406234600.23827.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, java-prs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, awk@spinnakernet.com Received:(qmail 30925 invoked from network); 6 Apr 2002 23:40:54 -0000 Received: from unknown (HELO panic.spinnakernet.com) (141.151.129.90) by sources.redhat.com with SMTP; 6 Apr 2002 23:40:54 -0000 Received: (from awk@localhost) by panic.spinnakernet.com (8.9.3/8.9.3) id SAA17466; Sat, 6 Apr 2002 18:41:27 -0500 Message-Id:<200204062341.SAA17466@panic.spinnakernet.com> Date: Sat, 06 Apr 2002 15:46:00 -0000 From: awk@spinnakernet.com Reply-To: awk@spinnakernet.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:3.113 Subject: libgcj/6209: output of java.io.File.getParent returns incorrect results X-SW-Source: 2002-04/txt/msg00420.txt.bz2 List-Id: >Number: 6209 >Category: libgcj >Synopsis: java.io.File.getParent returns incorrect results >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sat Apr 06 15:46:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: >Release: 3.1 20020406 (prerelease) >Organization: Spinnaker Networks Inc. >Environment: System: Linux panic.spinnakernet.com 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc/configure --host=i686-pc-linux-gnu --prefix=/spin/awk/compilers/gcc-3.1-hol --enable-shared --enable-threads=posix --enable-languages=c,c++,java --enable-version-specific-runtime-libs : (reconfigured) >Description: java.io.File returns a "/" whereas it should return a "null" when the path name does not name a parent (i.e. the path name is the root directory). The following java class when run on a sun jdk and on gcj displays the error. Run on sun jdk % javac FileTest.java % java FileTest Canonical Name "/" Name "" Parent Name "null" Run on head-of-line gcj % gcj --main=FileTest -o FileTest FileTest.java % ./FileTest Canonical Name "/" Name "" Parent Name "/" >How-To-Repeat: /* * Test java.io.File.getParent() on a root directory. */ import java.io.File; public class FileTest { public static void main(String[] args) { try { File f = new File("/"); System.out.println("Canonical Name \"" + f.getCanonicalPath() + "\" Name \"" + f.getName() + "\" Parent Name \"" + f.getParent() + "\""); } catch(Exception e) { System.out.println(" Exception Thrown "); } } }; >Fix: Fix libgcj java.io.File.java to match jdk api. >Release-Note: >Audit-Trail: >Unformatted: