Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSVParserBootstrapper creates UTF8Reader which is incorrectly not auto-closed #134

Closed
iuliu-b opened this issue May 31, 2019 · 2 comments
Closed
Labels
Milestone

Comments

@iuliu-b
Copy link

iuliu-b commented May 31, 2019

This line creates a UTF8Reader whose autoclose is determined by _context.isResourceManaged() alone. In other instances autoclose is determined by _ioContext.isResourceManaged() || isEnabled(StreamReadFeature.AUTO_CLOSE_SOURCE) or equivalent (see YAMLParser).

This means that in cases where AUTO_CLOSE_SOURCE is enabled but isResourceManaged() is false, files are left open where the user expects them to be auto-closed in line with other class behaviors.

@iuliu-b iuliu-b changed the title CSVParserBootstrapper creates UTF8Reader which is incorrectly not auto-closeable CSVParserBootstrapper creates UTF8Reader which is incorrectly not auto-closed May 31, 2019
@cowtowncoder
Copy link
Member

Thank you for reporting this -- yes, sounds like a bug to fix.

@cowtowncoder cowtowncoder added this to the 2.10 milestone Jun 1, 2019
@cowtowncoder cowtowncoder changed the title CSVParserBootstrapper creates UTF8Reader which is incorrectly not auto-closed CSVParserBootstrapper creates UTF8Reader which is incorrectly not auto-closed Jun 1, 2019
@cowtowncoder
Copy link
Member

Fixed, will be included in 2.10.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants