I have a RPC service with the following method:
public List<Serializable> myMethod(TransactionCall call) {...}
But I get a warning when this method is analyzed, and then the rpc call fails
Analyzing 'my.project.package.myService' for serializable types Analyzing methods: public abstract java.util.List<java.io.Serializable> myMethod(my.project.package.TransactionCall call) Return type: java.util.List<java.io.Serializable> [...] java.io.Serializable Verifying instantiability (!) Checking all subtypes of Object wich qualify for serialization
It seems I can't use Serializable for my List... I could use my own interface instead (something like AsyncDataInterface, wich implements the Serializable interface) but the fact is that my method will return a list custom objects AND basic objects (such as Strings, int....).
So my questions are:
- Is it a standart behaviour? (I can't figure out why I can't use this interface in that case)
- Does anyone have a workaround for that kind of situation?