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

Moses DeJong dejong at cs.umn.edu
Fri Feb 12 16:20:48 PST 1999


On Fri, 12 Feb 1999, Patrick Tullmann wrote:

> > The problem is that they throw a FileNotFoundException. The correct
> > thing to do in this case is to throw an IOException.

Do you have a better idea? This is a bug in the JDK implementation
so I do not think fixing it is a bad thing. It could break some
existing code but there is no other way to fix it. Sun is not
going to change the JDK implementation soon (even if they wanted to
JDK1.2 and JDK1.1 both implement this incorrect throws clause).
When will these problems ever get fixed if "bug compatibility" is
all we strive for.

mo
 
> If this fix is made, then any existing code that tries to catch
> FileNotFoundException and handle it will fail to compile as it doesn't
> catch IOException nor throw IOException.
> 
> -Pat
> 



More information about the kaffe mailing list