Description
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.
/** 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; } }
I think we should add a description in the comment to help the user read it.
Attachments
Attachments
Issue Links
- links to