Close file stream in test.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1635347 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2014-10-30 00:10:20 +00:00
parent 2ed5c6af23
commit 26e77ea862
1 changed files with 5 additions and 1 deletions

View File

@ -264,7 +264,11 @@ public abstract class AbstractObjectTest extends BulkTest {
*/
protected void writeExternalFormToDisk(final Serializable o, final String path) throws IOException {
final FileOutputStream fileStream = new FileOutputStream(path);
writeExternalFormToStream(o, fileStream);
try {
writeExternalFormToStream(o, fileStream);
} finally {
fileStream.close();
}
}
/**