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

EqualsBuilder causes StackOverflowException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 3.0
    • Component/s: lang.builder.*
    • Labels:
      None

      Description

      EqualsBuilder causes StackOverflowException when comparing objects with cyclical object references.

      e,g.
      static class TestObjectReference {
      @SuppressWarnings("unused")
      private TestObjectReference reference;
      @SuppressWarnings("unused")
      private TestObject one;

      public TestObjectReference(int one)

      { this.one = new TestObject(one); }

      public void setObjectReference(
      TestObjectReference reference)

      { this.reference = reference; }

      @Override
      public boolean equals(Object obj)

      { return EqualsBuilder.reflectionEquals(this, obj); }

      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sao Oliver Sauder
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: