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

Godmar Back gback at cs.utah.edu
Fri Feb 12 15:57:04 PST 1999


> 
> On Fri, 12 Feb 1999, Godmar Back wrote:
> 
> > > 
> > > Ok, here is a quick shot at that.
> > > 
> > 
> > This tests only one case, though.
> 
> The problem is that they throw a FileNotFoundException. The correct
> thing to do in this case is to throw an IOException. Then in the case
> where the file does not exist a FileNotFoundException can be thrown.
> A FileNotFoundException is derived from IOException so there would
> be no problem there. In the current JDK and Kaffe implementations
> an IOException is rethrown as a FileNotFoundException which is
> just plain wrong.
> 

Oh I see.  So you just lamented the current state of affairs.
While I agree that it would be beneficial to be able to distinguish
between the cases when a file cannot be read because it's not there,
or because it's not readable, I don't see the immediate need for it.
Also, some systems (Win98) don't even have file permissions, so it
would make even less sense there.
Why do you need to distinguish these cases?

In Kaffe, we can of course implement whatever we want, but in practice
I think we should pick a version of the JDK and be bug-compatible.

	- Godmar



More information about the kaffe mailing list