Close file stream in test.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1635348 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
26e77ea862
commit
3adcd2103d
|
@ -297,7 +297,11 @@ public abstract class AbstractObjectTest extends BulkTest {
|
|||
*/
|
||||
protected Object readExternalFormFromDisk(final String path) throws IOException, ClassNotFoundException {
|
||||
final FileInputStream stream = new FileInputStream(path);
|
||||
return readExternalFormFromStream(stream);
|
||||
try {
|
||||
return readExternalFormFromStream(stream);
|
||||
} finally {
|
||||
stream.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue