In message "Re: [kaffe] Saxon 7.9.1 does not work"
    on 04/06/01, Ito Kazumitsu <[EMAIL PROTECTED]> writes:

> When run with kaffe of 2004-05-14:
> bash-2.05b$ java Test 0
> file:/home/kaz/javatest/0
> 
> When run with kaffe of 2004-05-27:
> bash-2.05b$ java Test 0
> file:#/home/kaz/javatest/0

This is the cause of the problem.

java.net.URI.java:
  public URI(String scheme, String ssp, String fragment)
    throws URISyntaxException
  {
    this((scheme == null ? "" : scheme + ":")
         + (ssp == null ? "" : quote(ssp))
         + (fragment == null ? "" : "#" + quote(fragment)));
  }

java.io.File.java:
  public URI toURI()
  {
    String abspath = getAbsolutePath();

    if (isDirectory())
      abspath = abspath + separator;

    try
      {
        return new URI("file", "", abspath.replace(separatorChar, '/'));
      }
    catch (URISyntaxException use)
      {
        // Can't happen.
        throw (InternalError) new InternalError("Unconvertible file: "
                                                + this).initCause(use);
      }
  }

So,

  new File("something").toURI()
   --> new URI("file", "", "someabspath")
        --> "file:#someabspath"

java.io.File.java's toURI() must
   return new URI(
     "file", null, abspath.replace(separatorChar, '/'), null, null)

_______________________________________________
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to