[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

small bug report for

From: Dalibor Topic
Subject: small bug report for
Date: Fri, 21 Nov 2003 16:24:03 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Hi all,

the constructors in FileInputstream don't throw a FileNotFoundException when the File to open as an InputStream is actually a directory, as they should do. I've attached a test case that demonstrates the bug.

While there is a patch in kaffe for this bug, it existed in a previous form in the old version of before it was replaced by GNU Classpath's version[1], so I'd prefer to see a patch that can not be seen as derived from GPL'd code.

I've attached a simple test case.

dalibor topic

[1] Guilhem imported the file from Classpath, and fixed the bug. The code is similar (there are not that many ways to check if a file is a directory and throw an exception based on that) to the code from the earlier, GPLd version, checked in by Jim Pick and written by Patrick Tullman.

public class fistest {
        private static void construct(String name) {
                try {
                        FileInputStream fis = new FileInputStream(name);
                catch (Exception e) {

        public static void main(String [] args) {
                String [] test = { "/tmp" };

                for (int i = 0; i < test.length; i++) {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]