[kaffe] Bug in FileInputStream
Martin Lackner
lackner at dms.at
Sun Jun 9 08:07:16 PDT 2002
Hi,
I've a problem with kaffe (version 1.0.7-rc1) on an i686 system with Red
Hat 7.1. I reduced the failure to the following small example.
import java.io.FileInputStream;
import java.io.File;
public class KaffeFile {
public static void main(String[] argv) throws Exception {
File file = new File(".");
FileInputStream fis = new FileInputStream(file);
System.out.println("FAIL! Should throw an exception
(java.io.FileNotFoundException)!");
}
}
This class does not throw a java.io.FileNotFoundException, although
"file" is a directory. In the documentation of the constructor of
FileInputStream(File file) it says, that an FileNotFoundException is
thrown if the file does not exist, is a directory rather than a regular
file, or for some other reason cannot be opened for reading.
What I've called:
[shell] /usr/local/kaffe/bin/kaffe KaffeFile
FAIL! Should throw an exception (java.io.FileNotFoundException)!
[shell] /usr/local/kaffe/bin/kaffe -version
Kaffe Virtual Machine
Copyright (c) 1996-2000
Transvirtual Technologies, Inc. All rights reserved
Engine: Just-in-time v3 Version: 1.0.7-rc1 Java Version: 1.1
I did not found this bug in the known-bugs-section of the web page.
Thanks,
Martin
More information about the kaffe
mailing list