[jira] [Commented] (NUTCH-3027) Trivial resource leak patch in DomainSuffixes.java
[ https://issues.apache.org/jira/browse/NUTCH-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17825019#comment-17825019 ] ASF GitHub Bot commented on NUTCH-3027: --- sebastian-nagel commented on PR #802: URL: https://github.com/apache/nutch/pull/802#issuecomment-1987165751 Patch applied to master in d95e1a7, see comments on Jira in NUTCH-3027. Thanks again @skehrli ! > 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)
[jira] [Commented] (NUTCH-3027) Trivial resource leak patch in DomainSuffixes.java
[ https://issues.apache.org/jira/browse/NUTCH-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17825018#comment-17825018 ] ASF GitHub Bot commented on NUTCH-3027: --- sebastian-nagel closed pull request #802: fix for NUTCH-3027 contributed by skehrli URL: https://github.com/apache/nutch/pull/802 > 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)
[jira] [Commented] (NUTCH-3027) Trivial resource leak patch in DomainSuffixes.java
[ https://issues.apache.org/jira/browse/NUTCH-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (NUTCH-3027) Trivial resource leak patch in DomainSuffixes.java
[ https://issues.apache.org/jira/browse/NUTCH-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17808614#comment-17808614 ] Markus Jelsma commented on NUTCH-3027: -- Thanks Sascha Kehrli! Committed {color:#00}85fea6e46..6b0455454 master -> master{color} > 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 > 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)
[jira] [Commented] (NUTCH-3027) Trivial resource leak patch in DomainSuffixes.java
[ https://issues.apache.org/jira/browse/NUTCH-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17808396#comment-17808396 ] ASF GitHub Bot commented on NUTCH-3027: --- skehrli opened a new pull request, #802: URL: https://github.com/apache/nutch/pull/802 Thanks for your contribution to [Apache Nutch](https://nutch.apache.org/)! Your help is appreciated! Before opening the pull request, please verify that * there is an open issue on the [Nutch issue tracker](https://issues.apache.org/jira/projects/NUTCH) which describes the problem or the improvement. We cannot accept pull requests without an issue because the change wouldn't be listed in the release notes. * the issue ID (`NUTCH-`) - is referenced in the title of the pull request - and placed in front of your commit messages surrounded by square brackets (`[NUTCH-] Issue or pull request title`) * commits are squashed into a single one (or few commits for larger changes) * Java source code follows [Nutch Eclipse Code Formatting rules](https://github.com/apache/nutch/blob/master/eclipse-codeformat.xml) * Nutch is successfully built and unit tests pass by running `ant clean runtime test` * there should be no conflicts when merging the pull request branch into the *recent* master branch. If there are conflicts, please try to rebase the pull request branch on top of a freshly pulled master branch. * if new dependencies are added, - are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](https://www.apache.org/legal/resolved.html#category-a)? - are `LICENSE-binary` and `NOTICE-binary` updated accordingly? We will be able to faster integrate your pull request if these conditions are met. If you have any questions how to fix your problem or about using Nutch in general, please sign up for the [Nutch mailing list](https://nutch.apache.org/mailing_lists.html). Thanks! > 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 >Priority: Trivial > 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)