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

EqualsBuilder causes StackOverflowException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.5
    • 3.0
    • lang.builder.*
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: