[
https://issues.apache.org/jira/browse/AVRO-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17113303#comment-17113303
]
Hudson commented on AVRO-2762:
------------------------------
SUCCESS: Integrated in Jenkins build AvroJava #881 (See
[https://builds.apache.org/job/AvroJava/881/])
AVRO-2762:Unkown resource closed (dan:
[https://github.com/apache/avro/commit/cb0d6e88a4f0c985a2ecceab3be77dadd874e3cb])
* (edit) lang/java/avro/src/main/java/org/apache/avro/file/DataFileReader.java
> 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
> Assignee: Zezeng Wang
> Priority: Minor
> Fix For: 1.10.0
>
>
> 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)