On Mon, 18 May 2026 19:29:43 GMT, Kevin Walls <[email protected]> wrote:

> AttachNotSupportedException is already used for some "bad vmid" problems, so 
> although "not supported" is not the phrase I'd choose, it can be the right 
> Exception to throw for various problems.

The API iterates over the installed providers until it finds one that can 
attach to the target VM (or all fail).  It would be a valid choice for this JEP 
to add another attach provider implementation rather than add to the existing 
attach provider. 

AttachProvider.attachVirtualMachine is specified to throw 
AttachNotSupportedException "If the identifier cannot be parsed, or it 
corresponds to to a Java virtual machine that does not exist, or it corresponds 
to a Java virtual machine which this provider cannot attach". With main line, 
if you invoke attach with a file path as the id then it will throw 
AttachNotSupportedException already.

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

PR Comment: https://git.openjdk.org/jdk/pull/31011#issuecomment-4484856085

Reply via email to