This is the mail archive of the gcc-bugs@gcc.gnu.org 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 java.io.File("").getCanonicalFile() throws exception



>Number:         6652
>Category:       libgcj
>Synopsis:       new java.io.File("").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
>Closed-Date:
>Last-Modified:
>Originator:     Anthony Green
>Release:        3.1 20020508 (prerelease)
>Organization:
>Environment:
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) 
>Description:
	Sun's `new java.io.File("").getCanonicalFile()' returns a File for the
current directory.  libgcj currently throws an IOException.
>How-To-Repeat:
Try the following...

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

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


>Release-Note:
>Audit-Trail:
>Unformatted:


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