On Wed, 4 Nov 2026 17:49:55 GMT, Kevin Walls <[email protected]> wrote:

>> src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java line 
>> 54:
>> 
>>> 52:  */
>>> 53: @SuppressWarnings("restricted")
>>> 54: public class VirtualMachineImpl extends HotSpotVirtualMachineLive {
>> 
>> Have you considered renaming this to HotSpotVirtualMachineLiveImpl to be 
>> consistent with HotSpotVirtualMachineCoreDumpImpl?
>
> I was not sure about changing the name of the existing class that was exposed 
> to apps, in case they are expecting such instances.  Similarly to 
> AttachProviderImpl, that's the name some tools might be expecting to see.  
> It's not a public API but maybe such a change could be a problem.

It seems that since they are platform dependent files that it is unlikely any 
app is referencing them. Also, instantiation of AttachProviderImpl is buried in 
the module service provider support:

    provides com.sun.tools.attach.spi.AttachProvider with
        sun.tools.attach.AttachProviderImpl;

I don't think an app has any business casting an AttachProvider to 
AttachProviderImpl. In any case, not something for immediate action, but maybe 
file an RFE and see if it gets traction at some point.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31011#discussion_r4471451012

Reply via email to