public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libgcj/6209: output of java.io.File.getParent returns incorrect results
@ 2002-04-06 15:46 awk
0 siblings, 0 replies; only message in thread
From: awk @ 2002-04-06 15:46 UTC (permalink / raw)
To: gcc-gnats
>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:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-06 23:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-06 15:46 libgcj/6209: output of java.io.File.getParent returns incorrect results awk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).