[
https://issues.apache.org/jira/browse/NUTCH-3200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on NUTCH-3200 stopped by Lewis John McGibbney.
---------------------------------------------------
> Close Closeable resources flagged by Sonar java:S2095
> -----------------------------------------------------
>
> Key: NUTCH-3200
> URL: https://issues.apache.org/jira/browse/NUTCH-3200
> Project: Nutch
> Issue Type: Bug
> Affects Versions: 1.23
> Reporter: Lewis John McGibbney
> Assignee: Lewis John McGibbney
> Priority: Critical
> Fix For: 1.24
>
>
> SonarCloud reports 24 open BLOCKER Reliability issues on apache_nutch for
> rule java:S2095 ("Resources should be closed" / try-with-resources).
>
> {*}Plan{*}:
> # Fix real local-ownership leaks by converting to try-with-resources (or
> equivalent correct close) in the affected core and plugin classes (~19 issues
> across 17 files), including cases such as LinkDbReader never closed in
> CommonCrawlDataDumper and incomplete close of wrapped streams in LinkRank.
> # Do not change Hadoop RecordWriter/RecordReader deferred-close sites or the
> FTP Client data Socket return path (FetcherOutputFormat, ParseOutputFormat,
> SegmentReader, SegmentMerger, protocol-ftp Client). Those are ownership
> transfer; mark the corresponding Sonar issues as False Positive once this
> issue has a PR, citing this Jira key and the PR URL.
>
> This is a Bug (resource leaks / Sonar S2095 BUG), not a feature.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)