RFR: 8299518: HotSpotVirtualMachine shared code across different platforms [v3]

David Holmes dholmes at openjdk.org
Thu Jan 5 04:33:52 UTC 2023


On Thu, 5 Jan 2023 03:32:21 GMT, Yi Yang <yyang at openjdk.org> wrote:

>> harmless refactor to share code across different platforms of VirtualMachineImpl:
>> 1. Shared code to process command response after requesting a command execution
>> 2. Read functionality in SocketInputStream can be reused
>
> Yi Yang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add doc; readImpl/closeImpl to read/close

src/jdk.attach/windows/classes/sun/tools/attach/VirtualMachineImpl.java line 130:

> 128:         @Override
> 129:         protected int read(long fd, byte[] bs, int off, int len) throws IOException {
> 130:             return VirtualMachineImpl.readPipe(fd, bs, off, len);

If you add read/close methods for Windows that then call readPipe/closePipe, then we don't need to subclass and override.

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

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


More information about the serviceability-dev mailing list