[logback-dev] [JIRA] Resolved: (LBCORE-122) Joran IncludeAction does not close the input file stream in case of SaxParseException
Ceki Gulcu (JIRA)
noreply-jira at qos.ch
Tue Dec 1 23:35:44 CET 2009
[ http://jira.qos.ch/browse/LBCORE-122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ceki Gulcu resolved LBCORE-122.
-------------------------------
Fix Version/s: 0.9.18
Resolution: Fixed
Hello Michael,
Thanks for identifying and reporting this bug. It has been fixed in
http://github.com/ceki/logback/commit/d106f950fee98979df8f92537f47d5aea361b869
> Joran IncludeAction does not close the input file stream in case of SaxParseException
> -------------------------------------------------------------------------------------
>
> Key: LBCORE-122
> URL: http://jira.qos.ch/browse/LBCORE-122
> Project: logback-core
> Issue Type: Bug
> Components: Joran
> Affects Versions: 0.9.17
> Reporter: Michael Franz
> Assignee: Ceki Gulcu
> Fix For: 0.9.18
>
>
> If parsing include file for a Joran configuration fails e.g. with a SaxParseException then the include file stream is not closed immediately. Depending on the operation system fixing the configuration file requires to stop the Java VM or perhaps to run the garbage collector explicitly.
> From IncludeAction.java:
> InputStream in = getInputStream(ec, attributes);
> try {
> if (in != null) {
> parseAndRecord(in, recorder);
> in.close();
> }
> } catch (JoranException e) {
> addError("Error while parsing " + attributeInUse, e);
> } catch (IOException e) {
> // called if in.close did not work
> }
> The in.close() should be called in a finally block, so the the stream is ensured to be closed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the logback-dev
mailing list