[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: JBMDR-51; Annotation equals is completely broken

alesj do-not-reply at jboss.com
Sat Nov 1 03:32:09 EDT 2008


"alesj" wrote : 
  | 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;
  |   |                }
  |   |             }
  |   | 
As annotation can only take single dimension arrays as values this is fine.
But since I'm already fixing this:
 - http://lists.jboss.org/pipermail/jboss-development/2008-October/012837.html
I'll add a generic arrays equal to common-core.
Unless this is already done somewhere, and I just cannot find it. ;-)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186158#4186158

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4186158



More information about the jboss-dev-forums mailing list