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

Niklas Gustavsson commented on FTPSERVER-375:
---------------------------------------------

Patch looks good, feel free to commit.

As for equals (and hashCode()) ignoring user and fileName, this is on purpose. 
equals only attempts to see if the physical file is the same, not the user 
scoped file (which user/fileName represents).

> [FindBugs] NativeFtpFile implements equals(), but does not - hashCode()
> -----------------------------------------------------------------------
>
>                 Key: FTPSERVER-375
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-375
>             Project: FtpServer
>          Issue Type: Wish
>          Components: Core
>            Reporter: Sergey Vladimirov
>            Priority: Minor
>              Labels: equality, findbugs
>             Fix For: 1.0.6, 1.1.0
>
>         Attachments: FTPSERVER-375.patch
>
>
> In fact, i can't find why it need to implement equals() in first place. If 
> for any map - then hashCode() will also be required. For example, 
> this.file.getCanonicalFile().hashCode()
> Anyway, could we please have a comment why do we need equals() method? :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to