Commit a6b7cfb5 by andrewlewis Committed by Oliver Woodman

Close ParsingLoadable input streams that fail to open.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124836804
parent bd248ffe
...@@ -113,8 +113,8 @@ public final class ParsingLoadable<T> implements Loadable { ...@@ -113,8 +113,8 @@ public final class ParsingLoadable<T> implements Loadable {
@Override @Override
public final void load() throws IOException, InterruptedException { public final void load() throws IOException, InterruptedException {
DataSourceInputStream inputStream = new DataSourceInputStream(dataSource, dataSpec); DataSourceInputStream inputStream = new DataSourceInputStream(dataSource, dataSpec);
inputStream.open();
try { try {
inputStream.open();
result = parser.parse(dataSource.getUri(), inputStream); result = parser.parse(dataSource.getUri(), inputStream);
} finally { } finally {
inputStream.close(); inputStream.close();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment