[Kaffe] java.io.File(Input|Output)Stream question.

Archie Cobbs archie at whistle.com
Fri Feb 12 14:41:13 PST 1999

Moses DeJong writes:
> Oh, I get it now, you are saying that a file writer could hit a unix
> file that does not have write permission. If that was the case then the
> reader could also run into a file without read permission. So I guess
> the problem is that there would be no way to tell if a file existed but
> was not readable when a FileNotFoundException is thrown by a reader.
> So, this does seem like a bug in the Sun spec after all. Does this
> mean we should change the implementation of Kaffe's FileInputStream to
> throw an IOException instead of a FileNotFoundException. I took a look

No, that would break classes compiled to the JDK spec.

> the Kaffe's impl of FileInputStream and it does throw an IOException
> but it then catches the IOException and rethrows it as a
> FileNotFoundException.  A less specific exception like an IOException
> should not be rethrown as a more specific exception like a
> FileNotFoundException. It seems like this is a bug in the Sun JDK docs
> and implementation. Does anyone agree with me?

Yes, I do... why don't you file a bug with Sun and see what they think?



Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

More information about the kaffe mailing list