From c776a745b3278e1690c3d9a6ccda8cd75f3bd20f Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Tue, 8 Oct 2024 15:02:48 +0200 Subject: [PATCH] NetworkConnection: fix Error Prone warning --- java/se/sics/mspsim/util/NetworkConnection.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/se/sics/mspsim/util/NetworkConnection.java b/java/se/sics/mspsim/util/NetworkConnection.java index 1c635bb6c..bec034d62 100644 --- a/java/se/sics/mspsim/util/NetworkConnection.java +++ b/java/se/sics/mspsim/util/NetworkConnection.java @@ -149,6 +149,9 @@ private boolean connect(int port) { return true; } + // Records in Java should normally not contain arrays, but the code uses SendEvent solely as an internal container + // without comparing it to other objects. + @SuppressWarnings("ArrayRecordComponent") private record SendEvent(byte[] data, ConnectionThread source) {} final class SendThread implements Runnable {