public static InetAddress toInetAddress(String host) {
    if (host == null || host.length() == 0) {
      return null;
    }
    try {
      final int index = host.indexOf("/");
      if (index > -1) {
        return InetAddress.getByName(host.substring(index + 1));
      } else {
        return InetAddress.getByName(host);
      }
    } catch (UnknownHostException e) {
      throw new IllegalArgumentException(e.getMessage());
    }
  }
Converts the string host to an instance of InetAddress. Returns null if the string is empty.
Fails Assertion if the conversion would result in <code>java.lang.UnknownHostException</code>.
<p>
Any leading slashes on host will be ignored.

@param host string version the InetAddress

@return the host converted to InetAddress instance

@throws IllegalArgumentException in lieu of UnknownHostException
geode-common/src/main/java/org/apache/geode/internal/inet/LocalHostUtil.java