[ https://issues.apache.org/jira/browse/NUTCH-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17808626#comment-17808626 ]
Hudson commented on NUTCH-3027: ------------------------------- SUCCESS: Integrated in Jenkins build Nutch » Nutch-trunk #144 (See [https://ci-builds.apache.org/job/Nutch/job/Nutch-trunk/144/]) NUTCH-3027 Trivial resource leak patch in DomainSuffixes.java (markus: [https://github.com/apache/nutch/commit/d95e1a79d665dfd10ae88e9985f3d85e398a751e]) * (edit) src/java/org/apache/nutch/util/domain/DomainSuffixes.java > Trivial resource leak patch in DomainSuffixes.java > -------------------------------------------------- > > Key: NUTCH-3027 > URL: https://issues.apache.org/jira/browse/NUTCH-3027 > Project: Nutch > Issue Type: Bug > Components: util > Affects Versions: 1.20 > Reporter: Sascha Kehrli > Assignee: Markus Jelsma > Priority: Trivial > Fix For: 1.20 > > Original Estimate: 1m > Remaining Estimate: 1m > > Found a trivial resource leak in .../util/DomainSuffixes.java, where an > InputStream is not closed: > {code:java} > InputStream input = > this.getClass().getClassLoader().getResourceAsStream(file); > try { > new DomainSuffixesReader().read(this, input); > } catch (Exception ex) { > LOG.warn(StringUtils.stringifyException(ex)); > } {code} > > instead of: > {code:java} > try (InputStream input = > this.getClass().getClassLoader().getResourceAsStream(file)) { > new DomainSuffixesReader().read(this, input); > } catch (Exception ex) { > LOG.warn(StringUtils.stringifyException(ex)); > } {code} > Where the InputStream is automatically closed. -- This message was sent by Atlassian Jira (v8.20.10#820010)