On Tue, 18 Nov 2025 08:47:47 GMT, Alan Bateman <[email protected]> wrote:
>> Jonas Norlinder has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Prevent escaping: no shadowing > > test/jdk/java/lang/management/MemoryMXBean/TestGetTotalGcCpuTime.java line > 106: > >> 104: objs.add(new Object()); >> 105: } >> 106: System.gc(); > > No concern that escape analysis will eliminate the allocations here? > > Minor nit, should use 4-space indentation here. Thanks Alan. I believe this didn't happen with the current implementation. That being said, I reached out to @robcasloz to get his opinion if there are any risks. FWIW; I added objs as a private static field. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28362#discussion_r2536969057
