On Fri, 27 Aug 2021 15:23:35 GMT, Markus Grönlund <mgron...@openjdk.org> wrote:

>> Greetings,
>> 
>> Object.finalize() was deprecated in JDK9. There is an ongoing effort to 
>> replace and mitigate Object.finalize() uses in the JDK libraries; please see 
>> https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. 
>> 
>> We also like to assist users in replacing and mitigating uses in non-JDK 
>> code.
>> 
>> Hence, this changeset adds a periodic JFR event to help identify which 
>> classes are overriding Object.finalize().
>> 
>> Thanks
>> Markus
>
> Markus Grönlund has updated the pull request incrementally with three 
> additional commits since the last revision:
> 
>  - localize
>  - cleanup
>  - FinalizerStatistics

Marked as reviewed by egahlin (Reviewer).

src/java.base/share/classes/java/lang/ref/Finalizer.java line 71:

> 69:     }
> 70: 
> 71: 

extraneous whitespace?

test/jdk/jdk/jfr/event/runtime/TestFinalizerStatisticsEvent.java line 98:

> 96:               case TEST_CLASS_NAME: {
> 97:                   
> Asserts.assertTrue(event.getString("codeSource").startsWith("file://"));
> 98:                   foundTestClassName = true;

Could we (sanity) check "objects" and "totalFinalzersRun" fields as well?

-------------

PR: https://git.openjdk.java.net/jdk/pull/4731

Reply via email to