Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1499

Equals transitivity is violated in EqualsBuilder

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.9
    • None
    • lang.builder.*
    • Ubuntu 18.04

      JDK 1.8.0_221

      Commons Lang 3.9-RC2

      JUnit 5.4

    Description

      EqualsBuilder.reflectionEquals() does not hold transitivity when comparing two subclasses extending a common superclass. For example:

      Given that both class D and E are subclasses of class C, C == D and C == E should imply D == E. However EqualsBuilder.reflectionEquals(D, E) returns false when both EqualsBuilder.reflectionEquals(C, D) and EqualsBuilder.reflectionEquals(C, E) return true.

      A junit test is provided as attachment.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            Cap_JR Zhiqiang Zang

            Dates

              Created:
              Updated:

              Slack

                Issue deployment