This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libgcj/6652: new"").getCanonicalFile() throws exception

>Number:         6652
>Category:       libgcj
>Synopsis:       new"").getCanonicalFile() throws exception
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 13 14:26:00 PDT 2002
>Originator:     Anthony Green
>Release:        3.1 20020508 (prerelease)
System: Linux louie 2.4.7-10smp #1 SMP Thu Sep 6 17:09:31 EDT 2001 i686 unknown
Architecture: i686

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /louie/green/3.1/gcc/configure --prefix=/louie/green/3.1/i --enable-threads --enable-languages=c,c++,java : (reconfigured)  : (reconfigured)  : (reconfigured)  : (reconfigured)  : (reconfigured)  : (reconfigured) 
	Sun's `new"").getCanonicalFile()' returns a File for the
current directory.  libgcj currently throws an IOException.
Try the following...

public class foo
	public static void main (String args[])
		try {
			System.out.println (new"").getCanonicalFile ());
		} catch (Exception e) {
			System.err.println (e);

This idiom is actually used in some free software.  The work-around on
posixy systems is to change "" to ".".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]