[kaffe] Saxon 7.9.1 does not work

Ito Kazumitsu ito.kazumitsu at mail.hidec.co.jp
Mon May 31 17:38:03 PDT 2004


In message "Re: [kaffe] Saxon 7.9.1 does not work"
    on 04/06/01, Ito Kazumitsu <kaz at maczuka.gcd.org> 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)




More information about the kaffe mailing list