RFR: 8299518: HotSpotVirtualMachine shared code across different platforms [v3]
Serguei Spitsyn
sspitsyn at openjdk.org
Thu Jan 5 05:02:51 UTC 2023
On Thu, 5 Jan 2023 04:31:16 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> 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.
Good suggestion.
However, I wonder why the `fd` is casted from `long` to `int` on Unix.
-------------
PR: https://git.openjdk.org/jdk/pull/11823
More information about the serviceability-dev
mailing list