Lambdas and serialization
Paul Benedict
pbenedict at apache.org
Tue Oct 19 06:30:17 PDT 2010
Will the wrapper be serializable if the SAM interface is? That's a
good question, but I imagine it has to be because it is implementing
the interface.
public interface MySamType extends Serializable {
void doSomething(int x);
}
On Tue, Oct 19, 2010 at 8:11 AM, Alessio Stalla <alessiostalla at gmail.com> wrote:
> Hello,
>
> I just thought about an aspect that I don't recall having been
> mentioned on this list: if a lambda's target SAM type is serializable,
> will the SAM-converted lambda be guaranteed to be serializable as
> well? Or is it an unspecified implementation detail? I see a certain
> value in having serialization work for lambdas, but also a host of
> potential problems...
>
> Regards,
> Alessio
>
>
More information about the lambda-dev
mailing list