geode-core/src/main/java/org/apache/geode/management/internal/cli/shell/JmxOperationInvoker.java
public static String checkAndConvertToCompatibleIPv6Syntax(String hostAddress) {
    // if host string contains ":", considering it as an IPv6 Address
    // Conforming to RFC2732 - http://www.ietf.org/rfc/rfc2732.txt
    if (hostAddress.contains(":")) {
      LogWrapper logger = LogWrapper.getInstance();
      if (logger.fineEnabled()) {
        logger.fine("IPv6 host address detected, using IPv6 syntax for host in JMX connection URL");
      }
      hostAddress = "[" + hostAddress + "]";
      if (logger.fineEnabled()) {
        logger.fine("Compatible host address is : " + hostAddress);
      }
    }
    return hostAddress;
  }
/**
   * If the given host address contains a ":", considers it as an IPv6 address & returns the host
   * based on RFC2732 requirements i.e. surrounds the given host address string with square
   * brackets. If ":" is not found in the given string, simply returns the same string.
   * 
   * @param hostAddress host address to check if it's an IPv6 address
   *
   * @return for an IPv6 address returns compatible host address otherwise returns the same string
   */
If the given host address contains a ":", considers it as an IPv6 address & returns the host
based on RFC2732 requirements i.e. surrounds the given host address string with square
brackets. If ":" is not found in the given string, simply returns the same string.

@param hostAddress host address to check if it's an IPv6 address

@return for an IPv6 address returns compatible host address otherwise returns the same string
If the given host address contains a " : " considers it as an IPv6 address & returns the host based on RFC2732 requirements i . e . surrounds the given host address string with square brackets . If " : " is not found in the given string simply returns the same string . @param hostAddress host address to check if it ' s an IPv6 address @return for an IPv6 address returns compatible host address otherwise returns the same string
public static String checkAndConvertToCompatibleIPv6Syntax(String hostAddress) {
    if (hostAddress.contains(":")) {
      LogWrapper logger = LogWrapper.getInstance();
      if (logger.fineEnabled()) {
        logger.fine("IPv6 host address detected, using IPv6 syntax for host in JMX connection URL");
      }
      hostAddress = "[" + hostAddress + "]";
      if (logger.fineEnabled()) {
        logger.fine("Compatible host address is : " + hostAddress);
      }
    }
    return hostAddress;
  }
public static String checkAndConvertToCompatibleIPv6Syntax ( String hostAddress ) { if ( hostAddress . contains ( ":" ) ) { LogWrapper logger = LogWrapper . getInstance ( ) ; if ( logger . fineEnabled ( ) ) { logger . fine ( "IPv6 host address detected, using IPv6 syntax for host in JMX connection URL" ) ; } hostAddress = "[" + hostAddress + "]" ; if ( logger . fineEnabled ( ) ) { logger . fine ( "Compatible host address is : " + hostAddress ) ; } } return hostAddress ; }
If the given host address contains a ":", considers it as an IPv6 address & returns the host
 based on RFC2732 requirements i.e.
If the given host address contains a " : " considers it as an IPv6 address & returns the host based on RFC2732 requirements i . e .
// if host string contains ":", considering it as an IPv6 Address // Conforming to RFC2732 - http://www.ietf.org/rfc/rfc2732.txt