Expand my Community achievements bar.

LCDS - Expect List<Long>, get ArrayCollection of Integer

Avatar

Level 1

I have a POJO which declares a collection of List<Long>.

We're currently sending an ArrayCollection of Number, and it's arriving at the client as an ArrayCollection, populated with Integers.

Given the issues with Type Erasure & generics I understand how this is happening.  How do I fix it?

Unfortunately because of some internal limitations, the model cannot be changed.  Ie - we can't use a subtype, and we can't implement IExternalizable.

Are there other options for registering custom type converters in LCDS, other than IExternalizable?  Alternatively, are there any annotations we can use that indicate the type to be used for a collection?

Regards

Marty

0 Replies