e-strauss commented on code in PR #2363:
URL: https://github.com/apache/systemds/pull/2363#discussion_r2597982345


##########
src/main/java/org/apache/sysds/runtime/util/UnixPipeUtils.java:
##########
@@ -74,18 +85,21 @@ public static void readHandshake(int expectedId, 
BufferedInputStream bis) throws
                        bis.close();
                        throw new IOException("Failed to read handshake integer 
from pipe");
                }
+        compareHandshakeIds(expectedId, bis, buffer);
+    }
 
-               // Convert bytes to int (assuming little-endian to match 
typical Python struct.pack)
-               int receivedId = 
ByteBuffer.wrap(buffer).order(ByteOrder.LITTLE_ENDIAN).getInt();
-               expectedId += 1000;
+    private static void compareHandshakeIds(int expectedId, 
BufferedInputStream bis, byte[] buffer) throws IOException {
+        // Convert bytes to int (assuming little-endian to match typical 
Python struct.pack)
+        int receivedId = 
ByteBuffer.wrap(buffer).order(ByteOrder.LITTLE_ENDIAN).getInt();
+        expectedId += 1000;
 
-               if (receivedId != expectedId) {
-                       bis.close();
-                       throw new IllegalStateException("Handshake ID mismatch: 
expected " + expectedId + ", got " + receivedId);
-               }
-       }
+        if (receivedId != expectedId) {
+            bis.close();

Review Comment:
   thanks for catching that, i just switched to new IDE, and forgot to set the 
configs correctly...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to