diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-11 11:19:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-12-14 20:12:24 +0100 |
commit | 4544d10c3833b05a5cdb653e8ba59749f09430f1 (patch) | |
tree | ab7a674c674fc0f76f9f3d528d982d076a6469b8 /ridljar | |
parent | 5347fc187487f78d94f55654f4ac2e8ffdda54b2 (diff) |
cid#1556282 silence Unguarded read
Change-Id: If95e72b324378b334e106c9cb78e8e198f819573
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178451
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'ridljar')
-rw-r--r-- | ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java b/ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java index 4000a1d0a463..199232e6d9c7 100644 --- a/ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java +++ b/ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java @@ -114,6 +114,7 @@ public final class socketAcceptor implements XAcceptor { com.sun.star.lang.IllegalArgumentException { ServerSocket serv; + Boolean noDelay = null; synchronized (this) { if (server == null) { ConnectionDescriptor desc @@ -142,6 +143,7 @@ public final class socketAcceptor implements XAcceptor { + " vs. " + connectionDescription); } + noDelay = tcpNoDelay; serv = server; } Socket socket = null; @@ -153,8 +155,8 @@ public final class socketAcceptor implements XAcceptor { } // we enable tcpNoDelay for loopback connections because // it can make a significant speed difference on linux boxes. - if (tcpNoDelay != null) { - socket.setTcpNoDelay(tcpNoDelay.booleanValue()); + if (noDelay != null) { + socket.setTcpNoDelay(noDelay.booleanValue()); } else { InetSocketAddress address = (InetSocketAddress)socket.getRemoteSocketAddress(); |