[ 
https://issues.apache.org/jira/browse/NUTCH-3200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18101930#comment-18101930
 ] 

ASF GitHub Bot commented on NUTCH-3200:
---------------------------------------

lewismc opened a new pull request, #948:
URL: https://github.com/apache/nutch/pull/948

   PR for [NUTCH-3200](https://issues.apache.org/jira/browse/NUTCH-3200)




> 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)

Reply via email to