You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Karl Wright (JIRA)" <ji...@apache.org> on 2017/04/18 18:23:41 UTC

[jira] [Updated] (CONNECTORS-1413) Code smell in equals implementation

     [ https://issues.apache.org/jira/browse/CONNECTORS-1413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Wright updated CONNECTORS-1413:
------------------------------------
    Fix Version/s: ManifoldCF 2.8

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