[
https://issues.apache.org/jira/browse/LOGGING-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary Gregory resolved LOGGING-163.
----------------------------------
Resolution: Fixed
Assignee: Gary Gregory
Fix Version/s: Nightly Builds
Thank you for the report.
Fix in SVN trunk.
{noformat}
commit -m "[LOGGING-163] BufferedReader is not closed properly." -N
E:/vcs/svn/apache/commons/trunks-proper/logging/src/main/java/org/apache/commons/logging/LogFactory.java
E:/vcs/svn/apache/commons/trunks-proper/logging/src/main/java/org/apache/commons/logging/impl/SimpleLog.java
E:/vcs/svn/apache/commons/trunks-proper/logging/src/changes/changes.xml
notify.commit.modified
notify.commit.modified
notify.commit.modified
notify.commit.transmit
Unknown action received: commit finalizing
Committed revision 1765341.
{noformat}
You can test from SVN trunk or a SNAPSHOT build from
https://repository.apache.org/content/repositories/snapshots/
> BufferedReader is not closed properly
> -------------------------------------
>
> Key: LOGGING-163
> URL: https://issues.apache.org/jira/browse/LOGGING-163
> Project: Commons Logging
> Issue Type: Bug
> Affects Versions: 1.1.1, 1.2
> Reporter: Kaloyan Spiridonov
> Assignee: Gary Gregory
> Fix For: Nightly Builds
>
>
> In LogFactory class at line 552 there is BufferedReader that is not closed
> properly. For example if rd.readLine(); throw an exception then the Reader
> will remain open.
> {code}
> BufferedReader rd;
> try {
> rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
> } catch (java.io.UnsupportedEncodingException e) {
> rd = new BufferedReader(new InputStreamReader(is));
> }
> String factoryClassName = rd.readLine();
> rd.close();
> {code}
> In SimpleLog class at line 163 there is InputStream that is not closed
> properly.
> {code}
> InputStream in = getResourceAsStream("simplelog.properties");
> if(null != in) {
> try {
> simpleLogProps.load(in);
> in.close();
> } catch(java.io.IOException e) {
> // ignored
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)