persistence@glassfish.java.net

Re: field of type List<String>

From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
Date: Mon, 05 Mar 2007 09:38:08 +0530

It was never suggested that the interface be Serializable. The field can
use an implementation that's Serializable.

Thanks,
Sahoo

Jon Miller wrote:
> IMHO, it should be OK to use the List interface as long as it points
> to a class that implements Serializable. i.e. List<String> property =
> ArrayList<String>(); should work. Why should the interface have to be
> serializable? I don't like the idea of having to hard code it to a
> concrete type.
>
> Jon