/** * Validates that a service name meets the requirements of {@link NamedSPI} */ public static void checkServiceName(String name) { // based on harmony charset.java if (name.length() >= 128) { throw new IllegalArgumentException("Illegal service name: '" + name + "' is too long (must be < 128 chars)."); } for (int i = 0, len = name.length(); i < len; i++) { char c = name.charAt(i); if (!isLetterOrDigit(c)) { throw new IllegalArgumentException("Illegal service name: '" + name + "' must be simple ascii alphanumeric."); } } }
/** * Validates that a service name meets the requirements of {@link NamedSPI} */ public static void checkServiceName(String name) { // based on harmony charset.java if (name.length() >= 128) { throw new IllegalArgumentException("Illegal service name: '" + name + "' is too long (must be < 128 chars)."); } for (int i = 0, len = name.length(); i < len; i++) { char c = name.charAt(i); if (!isLetterOrDigit(c)) { throw new IllegalArgumentException("Illegal service name: '" + name + "' must be simple ascii alphanumeric."); } } }
/** * Validates that a service name meets the requirements of {@link NamedSPI} */ public static void checkServiceName(String name) { // based on harmony charset.java if (name.length() >= 128) { throw new IllegalArgumentException("Illegal service name: '" + name + "' is too long (must be < 128 chars)."); } for (int i = 0, len = name.length(); i < len; i++) { char c = name.charAt(i); if (!isLetterOrDigit(c)) { throw new IllegalArgumentException("Illegal service name: '" + name + "' must be simple ascii alphanumeric."); } } }
/** * Validates that a service name meets the requirements of {@link NamedSPI} */ public static void checkServiceName(String name) { // based on harmony charset.java if (name.length() >= 128) { throw new IllegalArgumentException("Illegal service name: '" + name + "' is too long (must be < 128 chars)."); } for (int i = 0, len = name.length(); i < len; i++) { char c = name.charAt(i); if (!isLetterOrDigit(c)) { throw new IllegalArgumentException("Illegal service name: '" + name + "' must be simple ascii alphanumeric."); } } }