Chris, you raise a good question. Example: JPA entities stored in an immutable list and the list belongs to a stateful EJB that gets passivated or clustered. Obviously, serialization would be occuring.
Cheers, Paul On Wed, Nov 25, 2015 at 10:14 AM, Chris Hegarty <chris.hega...@oracle.com> wrote: > On 24 Nov 2015, at 23:27, Stuart Marks <stuart.ma...@oracle.com> wrote: > > …. > > > > But in the hypothetical value-typed future, we might want to return > value types from at least some of the factory methods. Value types have no > notion of identity, so we don't want to make any statements that lead to > thinking about the identity of the returned object, even to the extent of > saying that it "might" be the "same" instance as one previously returned. > > > > Based on this, it occurs to me that I should add the "value-based" > disclaimer to the relevant section of class doc. (I also note that, > off-line, John Rose had already prompted me to do this, so I should heed > his advice.) > > Is there any impact on the Serializability of these collections, if > they are “value” based? I don’t think so, but I’m not sure, since > their serial form is not documented. Note to self: should we > document their serial form? > > > I'll also change the method docs to say something like, > > > > * Returns an immutable list containing <N> elements. > > * ... > > * @return a list containing the specified elements > > Looks fine. > > -Chris. > >