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