The fd count was only used if it was the finalizer thread. Any explicit close() call not from finalizer meant that the FD got closed.

        /*
* If FileDescriptor is still in use by another stream, the finalizer
         * will not close it.
         */
        if ((useCount <= 0) || !isRunningFinalize()) {
            close0();
        }

regards,
Sean.

On 01/11/2011 14:57, Charles Lee wrote:

Does it change the original mechanism? IIRC, the original will remain the other FileInputStream function well (can read from the under stream), until the fd count become 0.

Reply via email to