We have modified GNU Classpath at some places so that ORP with Classpath can run 
Jigsaw webserver plus Tomcat/GnuJSP JSP engine. Here we submit them for discussion. 
This is the first of the series.

Problems in java/io/File.java:
    a. getAbsolutePath() hasn't counted in windows-style path name (e.g. c:\dir\dir), 
so "if (path.startsWith(separator))..." will always return false when these path names 
are specified in "path" field. An extra "if" to check this could solve the problem in 
a somewhat ad hoc style, a more elegant way should involve  a design modification, I 
mean, it's better to delegate these platform-dependent judgements to a standalone 
platform-wise class.

    b. renameTo(): In Classpath's implementation:
                boolean rc = renameToInternal(path, dest.getPath());
                if (rc)
                    path = dest.getPath();
set "path" to new path is semantically different from Java library documentation. 
According to that, after renameTo() is called on File object, the "path" field won't 
be changed. What it does is to validate "dest", and invalidate this object (if rename 
operation succeeds).
         Current Classpath implementation makes Jigsaw fail in management of 
configuration files.
         So an apparent patch is:
                boolean rc = renameToInternal(path, dest.getPath());
        -       if (rc)
        -            path = dest.getPath();

    c. I wonder why Classpath comments out the snippet in list() that exerts 
FilenameFilter on the listInternal result. At least for Jigsaw it works well when I 
remove the comment tags.


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to