[jboss-dev-forums] [Design of JBossXB] - Re: JBossXB-2.0.0.CR5

scott.stark@jboss.org do-not-reply at jboss.com
Mon Sep 24 23:16:27 EDT 2007


The CollectionPropertyHandler type still needs to be the propertyType as the localPropertyType is only the colllection parameter type when overriden. If the localPropertyType is only overriden when it has not already been set to something other than the propertyType:


  |                else if (propertyType.isCollection() && ((ClassInfo) propertyType).getUnderlyingAnnotation(XmlType.class) == null)
  |                {
  |                   isCol = true;
  |                   propertyHandler = new CollectionPropertyHandler(property, propertyType);
  |                   ClassInfo typeArg = (ClassInfo) findComponentType(property);
  | 
  |                   //if (((ClassInfo) typeArg).getUnderlyingAnnotation(XmlType.class) != null)
  |                   if (typeArg != null && typeArg.getUnderlyingAnnotation(JBossXmlModelGroup.class) == null)
  |                   {// it may be a model group in which case we don't want to change the type
  | 
  |                      // TODO yes, this is another hack with collections
  |                      JBossXmlChild xmlChild = ((ClassInfo) propertyType).getUnderlyingAnnotation(JBossXmlChild.class);
  |                      if (xmlChild == null && localPropertyType.equals(propertyType))
  |                      {
  |                         localPropertyType = typeArg;
  |                      }
  |                   }
  |                }
  | 
Then all of the BeanTestCase tests pass, and of the 224 mc tests, there are only 9 failures. All the failures are xxxWithValue() tests where the value is null rather than as expected.


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

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



More information about the jboss-dev-forums mailing list