src/main/java/com/linecorp/armeria/server/VirtualHost.java
/**
     * IDNA ASCII conversion, case normalization and validation.
     */
IDNA ASCII conversion, case normalization and validation.
IDNA ASCII conversion case normalization and validation .
static String normalizeDefaultHostname(String defaultHostname) {
        requireNonNull(defaultHostname, "defaultHostname");
        if (needsNormalization(defaultHostname)) {
            defaultHostname = IDN.toASCII(defaultHostname, IDN.ALLOW_UNASSIGNED);
        }
        if (!HOSTNAME_PATTERN.matcher(defaultHostname).matches()) {
            throw new IllegalArgumentException("defaultHostname: " + defaultHostname);
        }
        return defaultHostname.toLowerCase(Locale.ENGLISH);
    }
static String normalizeDefaultHostname ( String defaultHostname ) { requireNonNull ( defaultHostname , "defaultHostname" ) ; if ( needsNormalization ( defaultHostname ) ) { defaultHostname = IDN . toASCII ( defaultHostname , IDN . ALLOW_UNASSIGNED ) ; } if ( ! HOSTNAME_PATTERN . matcher ( defaultHostname ) . matches ( ) ) { throw new IllegalArgumentException ( "defaultHostname: " + defaultHostname ) ; } return defaultHostname . toLowerCase ( Locale . ENGLISH ) ; }
IDNA ASCII conversion, case normalization and validation.
IDNA ASCII conversion case normalization and validation .