Correct use of Serializable with lambda functions
I'm  going to answer my own question. Never do this!. I have just tried saving a new Filefilter object with this filter:
.addFilter(&quot;Delete files, Delete all files&quot;,f-&gt;f.delete());

And when selected, it deletes all the files in the current directory.