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:
Gary D. Gregory 2014-10-30 00:12:34 +00:00
parent 26e77ea862
commit 3adcd2103d
1 changed files with 5 additions and 1 deletions

View File

@ -297,7 +297,11 @@ public abstract class AbstractObjectTest extends BulkTest {
*/ */
protected Object readExternalFormFromDisk(final String path) throws IOException, ClassNotFoundException { protected Object readExternalFormFromDisk(final String path) throws IOException, ClassNotFoundException {
final FileInputStream stream = new FileInputStream(path); final FileInputStream stream = new FileInputStream(path);
try {
return readExternalFormFromStream(stream); return readExternalFormFromStream(stream);
} finally {
stream.close();
}
} }
/** /**