Zezeng Wang created AVRO-2762:
---------------------------------
Summary: Unknown resource closed
Key: AVRO-2762
URL: https://issues.apache.org/jira/browse/AVRO-2762
Project: Apache Avro
Issue Type: Improvement
Components: java
Affects Versions: 1.9.2
Reporter: Zezeng Wang
DataFileReader will open the resource file, but it only deals with the resource
closing in abnormal situations, and it does not inform the user that he needs
to actively release the resource.
{code}
/** Construct a reader for a file. */
protected DataFileReader(SeekableInput sin, DatumReader<D> reader, boolean
closeOnError) throws IOException {
super(reader);
try {
this.sin = new SeekableInputStream(sin);
initialize(this.sin);
blockFinished();
} catch (final Throwable e) {
if (closeOnError) {
IOUtils.closeQuietly(sin);
}
throw e;
}
}
{code}
I think we should add a description in the comment to help the user read it.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)