commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LANG-606) EqualsBuilder causes StackOverflowException
Date Mon, 15 Mar 2010 09:03:27 GMT

     [ 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.


Mime
View raw message