XFire

typeMapping is null in ObjectType

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2.1
  • Fix Version/s: 1.2.2
  • Component/s: Aegis Module
  • Labels:
    None
  • Number of attachments :
    1

Description

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

Activity

Hide
Tim O'Brien added a comment -

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.

Show
Tim O'Brien added a comment - 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.
Hide
Ronald Mathies added a comment -

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!

Show
Ronald Mathies added a comment - 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!
Hide
Dan Diephouse added a comment -

Thanks, applied to SVN.

Show
Dan Diephouse added a comment - Thanks, applied to SVN.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: