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

Code smell in equals implementation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • ManifoldCF 2.8
    • CMIS connector
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: