RFR: 8342380: Implement JEP 498: Warn upon Use of Memory-Access Methods in sun.misc.Unsafe [v3]

Jaikiran Pai jpai at openjdk.org
Thu Nov 21 09:32:13 UTC 2024


On Thu, 21 Nov 2024 09:23:26 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> test/jdk/sun/misc/UnsafeMemoryAccessWarnings.java line 51:
>> 
>>> 49:     @ValueSource(strings = {
>>> 50:             "allocateMemory+freeMemory",
>>> 51:             "objectFieldOffset+putLong+getLong"
>> 
>> Is the removal of `invokeCleaner` method name from these method names intentional?
>
> Yes because testOneWarning is only useful when called with two or more method names.

Sorry I wasn't clear - what I meant was including `invokeCleaner` in the long list of method names like it was previously - `allocateMemory+freeMemory+objectFieldOffset+putLong+getLong+invokeCleaner`, not as an individual method name on its own. It's not a big deal to leave it out though, since these are not the complete set of method names anyway.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21762#discussion_r1851673746


More information about the core-libs-dev mailing list