8026344: j.u.c.a *Adder and *Accumulator extend a package private class that is Serializable

Alan Bateman Alan.Bateman at oracle.com
Wed Oct 23 16:18:44 UTC 2013


On 23/10/2013 15:37, Paul Sandoz wrote:
> :
>
>
> Testing wise if you really want to use lambda expressions then they need to be explicitly marked as serializable otherwise it's gonna barf (as you probably found out):
>
>          DoubleBinaryOperator plus = (DoubleBinaryOperator&  Serializable) (x, y) ->  x + y;
Yes, that is what I was looking for (and meant to search the lambda 
serialization tests to see how to do this).

>
> Should you test accumulation/addition/reset after deserialization just to make sure the value/identity are assigned correctly?
>
Good idea, I'll add that.

-Alan.



More information about the core-libs-dev mailing list