Uploaded image for project: 'Syncope'
  1. Syncope
  2. SYNCOPE-1533

Broken backward compatibilty because of changes in Equals and HashCode methods in TOs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.5
    • 2.1.6, 3.0.0-M0
    • core
    • None

    Description

      Starting from Syncope 2.1.X the contract of equals and hashCode methods has changed in transfer objects (TOs). It was done to improve the performance as previously they used the reflection. Some of models have an explicit declaration of equals and hashCode and the behavior remained as in 2.0.X version of Apache Syncope.

      Here is the list of models for which the calculation of equals and hashCode has changed:
      1. org.apache.syncope.client.console.widgets.reconciliation.Any
      2. org.apache.syncope.client.console.widgets.reconciliation.Anys
      3. org.apache.syncope.client.console.widgets.reconciliation.Misaligned
      4. org.apache.syncope.client.console.widgets.reconciliation.Missing
      5. org.apache.syncope.client.console.widgets.reconciliation.ReconciliationReport
      6. org.apache.syncope.common.lib.info.PlatformInfo
      7. org.apache.syncope.common.lib.info.SystemInfo
      8. org.apache.syncope.common.lib.log.LogAppender
      9. org.apache.syncope.common.lib.patch.ResourceDeassociationPatch
      10. org.apache.syncope.common.lib.policy.DefaultAccountRuleConf
      11. org.apache.syncope.common.lib.policy.PolicyTO
      12. org.apache.syncope.common.lib.policy.AccountPolicyTO
      13. org.apache.syncope.common.lib.policy.PasswordPolicyTO
      14. org.apache.syncope.common.lib.policy.ProvisioningPolicyTO
      15. org.apache.syncope.common.lib.policy.PullPolicyTO
      16. org.apache.syncope.common.lib.report.AbstractAnyReportletConf
      17. org.apache.syncope.common.lib.report.AbstractReportletConf
      18. org.apache.syncope.common.lib.report.AuditReportletConf
      19. org.apache.syncope.common.lib.report.GroupReportletConf
      20. org.apache.syncope.common.lib.report.ReconciliationReportletConf
      21. org.apache.syncope.common.lib.report.StaticReportletConf
      22. org.apache.syncope.common.lib.report.UserReportletConf
      23. org.apache.syncope.common.lib.to.AccessTokenTO
      24. org.apache.syncope.common.lib.to.AnyTypeClassTO
      25. org.apache.syncope.common.lib.to.AnyTypeTO
      26. org.apache.syncope.common.lib.to.CamelMetrics
      27. org.apache.syncope.common.lib.to.CamelRouteTO
      28. org.apache.syncope.common.lib.to.ConnIdObjectClassTO
      29. org.apache.syncope.common.lib.to.ConnInstanceTO
      30. org.apache.syncope.common.lib.to.ConnPoolConfTO
      31. org.apache.syncope.common.lib.to.DomainTO
      32. org.apache.syncope.common.lib.to.DynRealmTO
      33. org.apache.syncope.common.lib.to.ErrorTO
      34. org.apache.syncope.common.lib.to.ItemTO
      35. org.apache.syncope.common.lib.to.JobTO
      36. org.apache.syncope.common.lib.to.MailTemplateTO
      37. org.apache.syncope.common.lib.to.MappingTO
      38. org.apache.syncope.common.lib.to.OIDCLoginRequestTO
      39. org.apache.syncope.common.lib.to.OIDCLoginResponseTO
      40. org.apache.syncope.common.lib.to.OIDCLogoutRequestTO
      41. org.apache.syncope.common.lib.to.OIDCProviderTO
      42. org.apache.syncope.common.lib.to.OrgUnitTO
      43. org.apache.syncope.common.lib.to.ProvisionTO
      44. org.apache.syncope.common.lib.to.RealmTO
      45. org.apache.syncope.common.lib.to.ReconStatus
      46. org.apache.syncope.common.lib.to.RelationshipTypeTO
      47. org.apache.syncope.common.lib.to.ReportTemplateTO
      48. org.apache.syncope.common.lib.to.ResourceTO
      49. org.apache.syncope.common.lib.to.RoleTO
      50. org.apache.syncope.common.lib.to.SAML2IdPTO
      51. org.apache.syncope.common.lib.to.SAML2LoginResponseTO
      52. org.apache.syncope.common.lib.to.SAML2ReceivedResponseTO
      53. org.apache.syncope.common.lib.to.SAML2RequestTO
      54. org.apache.syncope.common.rest.api.beans.AbstractQuery
      55. org.apache.syncope.common.rest.api.beans.AccessTokenQuery
      56. org.apache.syncope.common.rest.api.beans.AnyQuery
      57. org.apache.syncope.common.rest.api.beans.ExecQuery
      58. org.apache.syncope.common.rest.api.beans.ExecuteQuery
      59. org.apache.syncope.common.rest.api.beans.SchemaQuery
      60. org.apache.syncope.common.rest.api.beans.TaskQuery
      61. org.apache.syncope.fit.core.reference.TestAccountRuleConf
      62. org.apache.syncope.fit.core.reference.TestPasswordRuleConf

      To preserve the previous behavior and don't break the backward compatibility equals and hashCode should be overwritten using the for org.apache.commons.lang3.builder.EqualsBuilder and org.apache.commons.lang3.builder.HashCodeBuilder .

      See https://lists.apache.org/thread.html/0111d8468ee529a02a82dc3d6e1db5a0b21b2409102c526048c0b4fe%40%3Cdev.syncope.apache.org%3E for details.

      Attachments

        Issue Links

          Activity

            People

              ilgrosso Francesco Chicchiriccò
              DmitriyB. Dmitriy Brashevets
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m