Uploaded image for project: 'ManifoldCF'
  1. ManifoldCF
  2. CONNECTORS-1413

Code smell in equals implementation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: ManifoldCF 2.8
    • Component/s: CMIS connector
    • Labels:
      None

      Description

      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

      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       }
      

      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!

        Attachments

        1. CONNECTORS-1413.patch
          0.9 kB
          Furkan Kamaci

          Activity

            People

            • Assignee:
              kamaci Furkan Kamaci
              Reporter:
              lifove JC
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: