On Mon, 2 Sep 2024 12:24:28 GMT, Yagmur Eren <[email protected]> wrote:

> A logic error in the block of code in com.sun.tools.jdi.TargetVM is fixed by 
> putting fromByteArray() method within else statement to prevent invoking it 
> when the array b is empty. See issue: 
> [JDK-8339384](https://bugs.openjdk.org/browse/JDK-8339384)

src/jdk.jdi/share/classes/com/sun/tools/jdi/TargetVM.java line 127:

> 125:                     done = true;
> 126:                 } else {
> 127:                     p = Packet.fromByteArray(b);

Just to clarify, the IOException here is not actually causing any problems. It 
is caught immediately below, and we've already set done = true, so we still end 
up shutting down the connection. Is that correct? I'm okay with the change 
since it is a bit cleaner.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20815#discussion_r1742673324

Reply via email to