On Tue, 23 Sep 2025 21:53:46 GMT, David Holmes <[email protected]> wrote:

>> Thanks David for pointing this out. A different instance with a different 
>> PID may have a different temp path, so the path should be specific to the 
>> instance. Since we don't need the path outside the constructor, I think we 
>> don't need to cache it. On the other hand I see that `getTempDirFromPid` is 
>> called twice, once for `.java_pid` and another time in `createAttachFile` 
>> when `.java_pid` doesn't exist. Would you suggest storing the path in a 
>> local variable in the constructor and then concatenating it with attach file 
>> name, or would a non-static member variable be more suitable for this?
>
> I would save it in a local in the constructor and pass it to 
> `createAttachFile` rather than passing the pid.

done

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25824#discussion_r2378277200

Reply via email to