[jira] Updated: (LANG-606) EqualsBuilder causes StackOverflowException

2010-03-18 Thread Oliver Sauder (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oliver Sauder updated LANG-606:
---

Attachment: EqualsBuilderCyclicalObjectReferences-v01.patch

Strange. I created the patch with svn diff   
EqualsBuilderCyclicalObjectReferences.patch. When I then reverted all files 
(svn revert -R .) and tried to apply the patch it did not apply cleanly on my 
system either.
After some research I found out that I probably hit a subversion bug 
(http://subversion.tigris.org/issues/show_bug.cgi?id=2164).

Well to workaround this problem instead of using svn diff I used the old 
fashion but working diff utility.

This patch now applies cleanly with the command patch -p1 -i 
EqualsBuilderCyclicalObjectReferences-v01.patch.

 EqualsBuilder causes StackOverflowException
 ---

 Key: LANG-606
 URL: https://issues.apache.org/jira/browse/LANG-606
 Project: Commons Lang
  Issue Type: Bug
  Components: lang.builder.*
Affects Versions: 2.5
Reporter: Oliver Sauder
Priority: Minor
 Fix For: 3.0

 Attachments: EqualsBuilderCyclicalObjectReferences-v01.patch, 
 EqualsBuilderCyclicalObjectReferences.patch


 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);
   }
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (LANG-606) EqualsBuilder causes StackOverflowException

2010-03-15 Thread Henri Yandell (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Henri Yandell updated LANG-606:
---

Fix Version/s: 3.0

 EqualsBuilder causes StackOverflowException
 ---

 Key: LANG-606
 URL: https://issues.apache.org/jira/browse/LANG-606
 Project: Commons Lang
  Issue Type: Bug
  Components: lang.builder.*
Affects Versions: 2.5
Reporter: Oliver Sauder
Priority: Minor
 Fix For: 3.0

 Attachments: EqualsBuilderCyclicalObjectReferences.patch


 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);
   }
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (LANG-606) EqualsBuilder causes StackOverflowException

2010-03-13 Thread Oliver Sauder (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oliver Sauder updated LANG-606:
---

Attachment: EqualsBuilderCyclicalObjectReferences.patch

Attached patch should solve the issue.

I've used the same attempt used in HashCodeBuilder solving the cyclical 
reference issue.

Only difference is that a registry with objects pairs is used. When checking if 
two objects have already be compared resp. registered those two objects need to 
be swapped as the cyclical reference takes place when the other object is the 
this object.

 EqualsBuilder causes StackOverflowException
 ---

 Key: LANG-606
 URL: https://issues.apache.org/jira/browse/LANG-606
 Project: Commons Lang
  Issue Type: Bug
  Components: lang.builder.*
Affects Versions: 2.5
Reporter: Oliver Sauder
Priority: Minor
 Attachments: EqualsBuilderCyclicalObjectReferences.patch


 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);
   }
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.