On Thu, 5 Jan 2023 02:36:59 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Yi Yang has refreshed the contents of this pull request, and previous 
>> commits have been removed. The incremental views will show differences 
>> compared to the previous content of the PR. The pull request contains two 
>> new commits since the last revision:
>> 
>>  - separate renaming
>>  - 8299518: HotSpotVirtualMachine shared code across different platforms
>
> src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java line 
> 188:
> 
>> 186: 
>> 187:     // known error
>> 188:     private static final int ATTACH_ERROR_BADVERSION = 101;
> 
> It doesn't look right that this has the same value as ATTACH_ERROR_NOTONCP

They are located in different error families. The former is to deal with 
agent_load and the latter is to deal with command execution version errors.

> src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java line 
> 425:
> 
>> 423: 
>> 424:         protected abstract int readImpl(long fd, byte[] bs, int off, 
>> int len) throws IOException;
>> 425:         protected abstract void closeImpl(long fd) throws IOException;
> 
> If the subclasses all override these in exactly the same way then these do 
> not need to be abstract and can simply delegate to VirtualMachineImpl.xxx

All Posix OS platforms call the same VirtualMachineImpl.read/write/etc, but 
Windows is an unusual guy, it calls VirtualMachineImpl.readPipe/writePipe/etc

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

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

Reply via email to