On Wed, 9 Jun 2021 12:37:19 GMT, Yasumasa Suenaga <ysuen...@openjdk.org> wrote:
>> Kevin Walls has updated the pull request incrementally with one additional >> commit since the last revision: >> >> One less File reference. > > src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java line 81: > >> 79: File f = createAttachFile(pid, ns_pid); >> 80: // Keep a canonical version of File, to delete, in case >> target process ends and /proc link has gone: >> 81: File f2 = f.getCanonicalFile(); > > Do we need to keep `f`? I think we can replace them to `createAttachFile(pid, > ns_pid).getCanonicalFile()`. That's true, we don't really need them both. ------------- PR: https://git.openjdk.java.net/jdk/pull/4418