[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: JBMDR-51; Annotation equals is completely broken
alesj
do-not-reply at jboss.com
Fri Oct 31 06:24:11 EDT 2008
"alesj" wrote :
| Do we have some generic code for arrays compare?
| So that I don't re-invent the wheel. ;-)
Too late, re-invented. :-)
| if (Objects.isArray(value))
| {
| if (Objects.isArray(other) == false)
| return Boolean.FALSE;
|
| int length = Array.getLength(value);
| if (length != Array.getLength(other))
| return Boolean.FALSE;
|
| for (int i = 0; i < length; i++)
| {
| if (JBossObject.equals(Array.get(value, i), Array.get(other, i)) == false)
| return Boolean.FALSE;
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185968#4185968
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185968
More information about the jboss-dev-forums
mailing list