[
https://issues.apache.org/jira/browse/NUTCH-3200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18104962#comment-18104962
]
Hudson commented on NUTCH-3200:
-------------------------------
SUCCESS: Integrated in Jenkins build Nutch » Nutch-trunk #261 (See
[https://ci-builds.apache.org/job/Nutch/job/Nutch-trunk/261/])
NUTCH-3200 Close Closeable resources flagged by Sonar java:S2095 (#948)
(github:
[https://github.com/apache/nutch/commit/21ba9a8a81710f890bece5456af0bbadf8a48fa9])
* (edit) src/java/org/apache/nutch/scoring/webgraph/LinkRank.java
* (edit)
src/plugin/parsefilter-naivebayes/src/java/org/apache/nutch/parsefilter/naivebayes/Train.java
* (edit)
src/plugin/protocol-file/src/java/org/apache/nutch/protocol/file/FileResponse.java
* (edit) src/java/org/apache/nutch/tools/ResolveUrls.java
* (edit)
src/plugin/parsefilter-naivebayes/src/java/org/apache/nutch/parsefilter/naivebayes/Classify.java
* (edit) src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java
* (edit) src/java/org/apache/nutch/tools/FileDumper.java
* (edit) src/java/org/apache/nutch/protocol/RobotRulesParser.java
* (edit) src/plugin/feed/src/java/org/apache/nutch/parse/feed/FeedParser.java
* (edit)
src/plugin/parse-js/src/java/org/apache/nutch/parse/js/JSParseFilter.java
* (edit) src/plugin/parse-zip/src/java/org/apache/nutch/parse/zip/ZipParser.java
* (edit) src/java/org/apache/nutch/crawl/TextProfileSignature.java
* (edit) src/java/org/apache/nutch/tools/CommonCrawlDataDumper.java
> 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)