On Wed, 4 Jan 2023 02:55:52 GMT, Yi Yang <yy...@openjdk.org> wrote:

>> src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java line 59:
>> 
>>> 57: 
>>> 58:         // This provider only understands pids
>>> 59:         int pid = Integer.parseInt(vmid);
>> 
>> This will now throw `NumberFormatException` instead of the expected 
>> `AttachNotSupportedException`.
>
> The same check is performed in its superclass HotSpotVirtualMachine. So we 
> can be sure that it will not throw NumberFormatException and 
> AttachNotSupportedException here
> 
> https://github.com/openjdk/jdk/blob/38cfc591725de478879266584280562f0ba4b42f/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java#L69-L74

In that case the `int pid` determined by the superclass should be made 
available to the subclasses so they can use it and not need to re-parse the 
`vmid`.

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

PR: https://git.openjdk.org/jdk/pull/11823

Reply via email to