XMLTypeCreator loses generic collection type
--------------------------------------------

                 Key: XFIRE-836
                 URL: http://jira.codehaus.org/browse/XFIRE-836
             Project: XFire
          Issue Type: Bug
          Components: Aegis Module
    Affects Versions: 1.2.4
            Reporter: Sven Mueller
         Assigned To: Dan Diephouse
            Priority: Minor


Assume a type with a property of a generic collection type and a mapping file 
setting only the nillable attribute for this property:

class CollectionHolder {
  private List<ElementType> list;
}

<mappings>
  <mapping>
    <property name="list" nillable="false"/>
  </mapping>
</mappings>

At runtime this will result in an XFireRuntimeException "Couldn't create type 
for property list on class CollectionHolder: Cannot create mapping for 
java.util.List, unspecified component type for property list". Of course 
providing the componentType attribute in the property mapping would solve this 
problem. However, this information is available by the generic type declaration 
- and it would actually be applied from there if no XML mappings were given at 
all.

I think this could be solved if XMLTypeCreator.createClassInfo() would delegate 
class info creation to nextCreator (here: Java5TypeCreator) rather than 
creating a fresh one via constructor call. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to