/** * Perform domainprep on the input String. * * @param string the input String. * @return the domainprep String. * @throws XmppStringprepException if the input String can not be transformed. */ public static String domainprep(String string) throws XmppStringprepException { if (xmppStringprep == null) { return string; } // Avoid cache lookup if string is the empty string throwIfEmptyString(string); String res = DOMAINPREP_CACHE.lookup(string); if (res != null) { return res; } res = xmppStringprep.domainprep(string); DOMAINPREP_CACHE.put(string, res); return res; }