RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

David Holmes david.holmes at oracle.com
Tue Dec 15 06:59:36 UTC 2015


Hi Roger,

On 15/12/2015 8:38 AM, Roger Riggs wrote:
> Hi,
>
> The complexity of using Lambda for cleaning functions are too hard to
> explain in depth
> in the context of an example.  A more conservative approach is to show
> using a static nested
> class.  A lambda savvy developer can correctly determine how to avoid
> the pitfalls, and others
> should stick to the static nested class.
>
> [1]http://cr.openjdk.java.net/~rriggs/webrev-cleaner-8138696/
> [2]http://cr.openjdk.java.net/~rriggs/cleaner-doc/index.html

I still think Cleaner deserves to be mentioned in the package javadoc.

I also strongly urge the thunk/function -> action, change. Terminology 
is important.

Thanks,
David
-----


> Thanks, Roger
>
> p.s. last call for comments
>



More information about the core-libs-dev mailing list