mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-167 added JSR166y tests
This commit is contained in:
@@ -81,14 +81,18 @@ abstract class AbstractChannelReplicator implements Closeable {
|
||||
return result;
|
||||
}
|
||||
|
||||
static SocketChannel openSocketChannel(final CloseablesManager closeables) throws IOException {
|
||||
static SocketChannel openSocketChannel(final CloseablesManager closeables) throws IOException {
|
||||
SocketChannel result = null;
|
||||
|
||||
try {
|
||||
result = SocketChannel.open();
|
||||
} finally {
|
||||
if (result != null)
|
||||
closeables.add(result);
|
||||
try {
|
||||
closeables.add(result);
|
||||
} catch (IllegalStateException e) {
|
||||
// already closed
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user