This is an automated email from the ASF dual-hosted git repository. markus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nutch.git
The following commit(s) were added to refs/heads/master by this push: new d95e1a79d NUTCH-3027 Trivial resource leak patch in DomainSuffixes.java new 6b0455454 Merge branch 'master' of https://gitbox.apache.org/repos/asf/nutch d95e1a79d is described below commit d95e1a79d665dfd10ae88e9985f3d85e398a751e Author: Markus Jelsma <mar...@apache.org> AuthorDate: Fri Jan 19 12:53:40 2024 +0100 NUTCH-3027 Trivial resource leak patch in DomainSuffixes.java --- src/java/org/apache/nutch/util/domain/DomainSuffixes.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/nutch/util/domain/DomainSuffixes.java b/src/java/org/apache/nutch/util/domain/DomainSuffixes.java index ae0d31b52..455f36712 100644 --- a/src/java/org/apache/nutch/util/domain/DomainSuffixes.java +++ b/src/java/org/apache/nutch/util/domain/DomainSuffixes.java @@ -41,9 +41,9 @@ public class DomainSuffixes { /** private ctor */ private DomainSuffixes() { String file = "domain-suffixes.xml"; - InputStream input = this.getClass().getClassLoader() - .getResourceAsStream(file); - try { + + try (InputStream input = this.getClass().getClassLoader() + .getResourceAsStream(file)) { new DomainSuffixesReader().read(this, input); } catch (Exception ex) { LOG.warn(StringUtils.stringifyException(ex));