-
Bug
-
Resolution: Fixed
-
P3
-
1.1.4
-
1.2beta4
-
generic
-
generic
-
Not verified
Name: dgC58589 Date: 11/14/97
java.util.ResourceBundle has a file descriptor leak.
It never closes the file that it opened to read
the resources. If the file that is returned is
a normal file input stream, then finalization will
eventually close the file. But if the file is a
random access file, which has no finalization method
(I already filed a bug about that), then the file
is never closed.
Here's the code fragment from ResourceBundle.findBundle()
that doesn't close the file:
debug("Searching for " + searchName );
stream = loader.getResourceAsStream(searchName);
if( stream != null ) {
// make sure it is buffered
stream = new java.io.BufferedInputStream(stream);
try {
lookup = (Object)new PropertyResourceBundle( stream );
break searchLoop;
} catch (Exception e) {}
}
(Review ID: 20161)
======================================================================