This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

Patches to java.io.File, natFilePosix.cc and natFileDescriptorPosix.cc(fwd)


resend due to problems with the spam filter at redhat

---------- Forwarded message ----------
Date: Thu, 27 Nov 2003 16:47:36 +0100 (CET)
From: Anselm Kruis <A.Kruis@science-computing.de>
To: java-patches@gcc.gnu.org
Cc: ank@science-computing.de
Subject: Patches to java.io.File, natFilePosix.cc and natFileDescriptorPosix.cc

Hi,

I created the attached patches to solve some problems with java.io.File
and java.io.FileDescriptor.

1. fix the handling of files of the form
     java.io.File("//") java.io.File("///") ...
   in private String normalizePath(String p)

2. fix
     java.io.File("").getAbsolutePath()
   to return
     System.getProperty("user.dir")
   instead of
     System.getProperty("user.dir") + separatorChar

3. fix java.io.File.getCanonicalPath()

   The previous implementation didn't handle cases, where a leading part of
   the path contained symlinks and the trailing part didn't exist.

4. fix the encoding of file names.

   Suns jdk uses the default enconding System.getProperty("file.encoding")
   for file names. libgcj used to use UTF8. This causes major trouble, if
   you have file-names containing ISO 8859-1 encoded german Umlautes (äöü).

The patch was developed and tested on a Linux system only. I read the
instructions on the GNU GCC home page about submitting patches and know,
that my patch doesn't follow the coding standards at all. Unfortunately I
have no time to reformat the patch and divide it into independent pieces.
Nevertheless I hope the patch will be of some value.

Best Regards
  Anselm Kruis




---
 Anselm Kruis                                   science + computing ag
 Senior Consultant Professional Services        Ingolstädter Str. 22
 email A.Kruis@science-computing.de             80807 München, Germany
 phone +49 89 356386 874                        www.science-computing.de
 fax   +49 89 356386 737

Attachment: java.io.patch
Description: Text document


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