classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Re: [commit-cp] classpath ./ChangeLog java/io/File.java vm/


From: Mark Wielaard
Subject: [cp-patches] Re: [commit-cp] classpath ./ChangeLog java/io/File.java vm/refe...
Date: Wed, 28 Jul 2004 08:54:12 +0200

Hi,

On Tue, 2004-07-27 at 10:47, Jeroen Frijters wrote:
>       2004-07-27  Jeroen Frijters  <address@hidden>
>       
>       * vm/reference/java/io/VMFile.java (toCanonicalForm): New method.

This should have been made a static method.
Fixed by the attached patch to get File.java compiling again.

2004-07-28  Mark Wielaard  <address@hidden>

        * vm/reference/java/io/VMFile.java (toCanonicalForm): Made
        static.

>       * java/io/File.java (dupSeparator): New field. (File(String)):
>       Modified to use new normalizePath method. (normalizePath): New method
>       merged from libgcj.
>       (File(String,String)): Modified to use new normalizePath method.
>       (File(File,String)): Modified to forward to File(String,String).
>       (File(URI)): New constructor. (getAbsolutePath): Merged from libgcj.
>       (getCanonicalPath): New implementation that forwards to VMFile.
>       (getParent): Merged from libgcj. (isAbsolute): Merged from libgcj.
>       (list(FilenameFilter)): Removed unnecessary path normalization.
>       (toURL): Merged from libgcj. (mkdir): Removed unnecessary path
>       normalization. (compareTo): Removed incorrect canonicalization.

Minor style nitpick. Could you in the future start each changed method
on a new line, that makes it a lot easier to see which methods were
changed by the patch. Something like this:

        * java/io/File.java (dupSeparator): New field.
        (File(String)): Modified to use new normalizePath method.
        (File(String,String)): Modified to use new normalizePath method.
        (File(File,String)): Modified to forward to File(String,String).
        (File(URI)): New constructor.
        (normalizePath): New method merged from libgcj.
        (getAbsolutePath): Merged from libgcj.
        (getCanonicalPath): New implementation that forwards to VMFile.
        (getParent): Merged from libgcj. (isAbsolute): Merged from libgcj.
        (list(FilenameFilter)): Removed unnecessary path normalization.
        (toURL): Merged from libgcj.
        (mkdir): Removed unnecessary path normalization.
        (compareTo): Removed incorrect canonicalization.

Thanks,

Mark
Index: vm/reference/java/io/VMFile.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/java/io/VMFile.java,v
retrieving revision 1.2
diff -u -r1.2 VMFile.java
--- vm/reference/java/io/VMFile.java    27 Jul 2004 08:44:08 -0000      1.2
+++ vm/reference/java/io/VMFile.java    28 Jul 2004 00:10:46 -0000
@@ -194,7 +194,7 @@
 
   /**
    * This method returns a canonical representation of the pathname of
-   * this file.  The actual form of the canonical representation is
+   * the given path.  The actual form of the canonical representation is
    * different.  On the GNU system, the canonical form differs from the
    * absolute form in that all relative file references to "." and ".."
    * are resolved and removed.
@@ -205,7 +205,7 @@
    *
    * @exception IOException If an error occurs
    */
-  public String toCanonicalForm(String path) throws IOException
+  public static String toCanonicalForm(String path) throws IOException
   {
        // FIXME: this only works on UNIX
        return PlatformHelper.toCanonicalForm(path);

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]