gwt - Using List in a RPC call?

前端 未结 3 1316
情书的邮戳
情书的邮戳 2020-11-30 12:48

I have a RPC service with the following method:

public List myMethod(TransactionCall call) {...}
3条回答
  •  爱一瞬间的悲伤
    2020-11-30 12:54

    I don't see the point of defining List as the return value. The type Serializable provides no additional information in the service API declaration. GWT will make the serialization check at runtime anyway.

    In your case, where the list elements have no common ancestor other than Object, I would use List.

提交回复
热议问题