You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/08/08 08:59:00 UTC

[jira] [Commented] (NUTCH-2817) Avoid check for equality of URL path and file part using ==/!=

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

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

sebastian-nagel opened a new pull request #548:
URL: https://github.com/apache/nutch/pull/548


   - replace check whether URL path and file are identical by check whether URL has a query
   - clean up code and improve log messages
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Avoid check for equality of URL path and file part using ==/!=
> --------------------------------------------------------------
>
>                 Key: NUTCH-2817
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2817
>             Project: Nutch
>          Issue Type: Sub-task
>          Components: plugin, protocol
>    Affects Versions: 1.17
>            Reporter: Sebastian Nagel
>            Priority: Minor
>             Fix For: 1.18
>
>
> In the plugins protocol-file and protocol-ftp Spotbugs warns about "Comparison of String objects using == or !=". This is actual a false positive since path and file point to the same object for URLs with no query part (a query is not supported for file:// and ftp://). To check for existence of the query part would be better to understand and also avoids the Spotbugs warning.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)