manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Furkan KAMACI (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CONNECTORS-1413) Code smell in equals implementation
Date Tue, 18 Apr 2017 18:24:41 GMT

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

Furkan KAMACI commented on CONNECTORS-1413:
-------------------------------------------

Yes, you are right. [~kwright@metacarta.com] I can commit my patch to trunk?

> Code smell in equals implementation
> -----------------------------------
>
>                 Key: CONNECTORS-1413
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1413
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: CMIS connector
>            Reporter: JC
>            Assignee: Karl Wright
>            Priority: Trivial
>             Fix For: ManifoldCF 2.8
>
>         Attachments: CONNECTORS-1413.patch
>
>
> Hi
> In a recent snapshot, I've found a suspicious code in connectors/cmis/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/cmis/CmisAuthorityConnector.java
> {code}
> 402       public boolean equals(Object o)
> 403       {
> 404         if (!(o instanceof AuthorizationResponseDescription))
> 405           return false;
> 406         AuthorizationResponseDescription ard = (AuthorizationResponseDescription)o;
> 407         return ard.userName.equals(userName) && ard.endpoint.equals(endpoint)
&&
> 408           repositoryId.equals(repositoryId);
> 409       }
> {code}
> In Line 408,  repositoryId.equals(repositoryId) should be  repositoryId.equals(*ard*.repositoryId)?
This might be a trivial issue but wanted to report just in case. Thanks!



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message