RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization
Chris Hegarty
chris.hegarty at oracle.com
Thu Dec 3 18:08:33 UTC 2015
On 3 Dec 2015, at 15:58, Roger Riggs <Roger.Riggs at oracle.com> wrote:
> Hi Chris,
>
> Thanks for the review and comments:
>
> The webrev and javadoc have been updated.
>
> On 12/03/2015 08:55 AM, Chris Hegarty wrote:
>> On 2 Dec 2015, at 20:23, Roger Riggs <Roger.Riggs at oracle.com> wrote:
>>
>>> Please review the java.lang.ref.Cleaner and tests following the recommendation to simplify the public
>>> interface to support only phantom cleanup.
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~rriggs/webrev-cleaner-8138696/
>>>
>>> Javadoc:
>>> http://cr.openjdk.java.net/~rriggs/cleaner-doc/index.html
>> Just a few minor inconsistencies, and subjective wording suggestions:
>>
>> 1) "Cleaner manages a set of …” -> "A Cleaner manages a set of …”
> This is the first sentence looks better in the package summary without the article
> and matches the descriptions of other classes in the package.
Ah yes, I see that now. Good point.
>> 2) "related to"- > "relating to” ??
> ok
>>
>> 3) "Return a new Cleaner” -> "ReturnS a new Cleaner”
> right
>> 4) " Cleanable is a registered cleaning function.” ->
>> “A Cleanable is a registered cleaning function."
> ditto, first sentence form above.
>>
>> 5) "Unregister the Cleanable and invoke the …” ->
>> "UnregisterS the Cleanable and invokeS the …”
> ok
>>
>> 6) Is a Cleanable a @FunctionalInterface ?
> But marking it as @FunctionalInterface is not advisable.
> The interface is not implemented by clients of the Cleaner.
> The only implementation is inside the Cleaner implementation
> and there is no point in drawing attention to the interface in tools.
Ok.
-Chris.
More information about the core-libs-dev
mailing list