History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XFIRE-643
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Diephouse
Reporter: Tim O'Brien
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
XFire

typeMapping is null in ObjectType

Created: 14/Sep/06 10:56 AM   Updated: 24/Sep/06 01:07 PM
Component/s: Aegis Module
Affects Version/s: 1.2.1
Fix Version/s: 1.2.2

Time Tracking:
Not Specified

File Attachments: 1. Text File patch.txt (0.5 kb)



 Description  « Hide
When I use a Map<String,String>, I see that aegis creates a MapType, but the keyType and objectType are both set to ObjectType, and I get a null pointer exception because the ObjectType instance has a null typeMapping.

I think I've tracked it down to a method in AbstractTypeCreator:

private Type createObjectType()

{ ObjectType type = new ObjectType(); type.setSchemaType(DefaultTypeMappingRegistry.XSD_ANY); type.setTypeClass(Object.class); return type; }

Shouldn't that be setting calling setTypeMapping(tm). I'll submit a patch, but I wanted to make sure this was a problem before I did so



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Tim O'Brien - 14/Sep/06 11:25 AM
Here is a one liner patch that just calls setTypeMapping() on the ObjectType created in AbstractTypeCreator. Once I added this, Xfire successfully created my message.

Ronald Mathies - 19/Sep/06 03:41 PM
I've had the same problem when a method returns a Collection or List of for example String objects. The given path solves this.
Thanx Tim!

Dan Diephouse - 24/Sep/06 01:07 PM
Thanks, applied to SVN.