docs: @SuppressWarnings({"checkstyle:npathcomplexity"})
      @SuppressFBWarnings("RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED")
      private synchronized boolean bind0(TcpIpConnection connection, Address remoteEndpoint,
                                         Collection<Address> remoteAddressAliases, boolean reply) {
          final Address remoteAddress = new Address(connection.getRemoteSocketAddress());
          if (tcpIpEndpointManager.connectionsInProgress.contains(remoteAddress)) {
              // this is the connection initiator side --> register the connection under the address that was requested
              remoteEndpoint = remoteAddress;
          }
          if (remoteEndpoint == null) {
              if (remoteAddressAliases == null) {
                  throw new IllegalStateException("Remote endpoint and remote address aliases cannot be both null");
              } else {
                  // let it fail if no remoteEndpoint and no aliases are defined
                  remoteEndpoint = remoteAddressAliases.iterator().next();
              }
          }
          connection.setEndPoint(remoteEndpoint);
          ioService.onSuccessfulConnection(remoteEndpoint);
          if (reply) {
              BindRequest bindRequest = new BindRequest(logger, ioService, connection, remoteEndpoint, false);
              bindRequest.send();
          }
  
          if (checkAlreadyConnected(connection, remoteEndpoint)) {
              return false;
          }
  
          if (logger.isLoggable(Level.FINEST)) {
              logger.finest("Registering connection " + connection + " to address " + remoteEndpoint);
          }
          boolean returnValue = tcpIpEndpointManager.registerConnection(remoteEndpoint, connection);
  
          if (remoteAddressAliases != null && returnValue) {
              for (Address remoteAddressAlias : remoteAddressAliases) {
                  if (logger.isLoggable(Level.FINEST)) {
                      logger.finest("Registering connection " + connection + " to address alias " + remoteAddressAlias);
                  }
                  tcpIpEndpointManager.connectionsMap.putIfAbsent(remoteAddressAlias, connection);
              }
          }
  
          return returnValue;
      }