manifoldcf-dev mailing list archives

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

             Summary: 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
            Priority: Trivial


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