Oooops ... sorry got my mailing lists all messed up.

Please except my apologies!!!

Theo

-----Original Message-----
From: Theo Harper 
Sent: 10 April 2002 16:46
To: [EMAIL PROTECTED]
Subject: [Xdoclet-user] collection="collection" and java.util.List
return type.


I would like some feedback on a possible bug I have found in
MappingLoader.java on line 1022, CVS 1.77.  The isAssignableFrom test seems
to be the wrong way around. (Almost always a source of confusion!!)

Here's my scenario.  I have a setter on my class which takes java.util.List
as an argument, in the mapping file I have defined this field using
collection="collection".  When I try run my test code, which exercises
marshalling and unmarshalling my object I get the following exception:

org.exolab.castor.mapping.MappingException: The method setObjects in class
Foo 
accepting/returning object of type interface java.util.Collection was not
found.

I have tracked this problem down to line 1022 of MappingLoader.java

    Types.typeFromPrimitive( parameterTypes[0] ).isAssignableFrom(
fieldTypeFromPrimitive ) )) {

in the debugger this comes out as:
  
    java.util.List.isAssignableFrom(java.util.Collection)

should this not be:

    fieldTypeFromPrimitive.isAssignableFrom( Types.typeFromPrimitive(
parameterTypes[0] )) )) {

Not sure if this is associated with bug 834.

Theo


_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to