public static void checkName ( String s ) { for ( char c : s . toCharArray ( ) ) { if ( c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' ) { continue ; } if ( c < 32 || c >= 127 || ! Character . isJavaIdentifierPart ( c ) ) { throw new IllegalArgumentException ( "Cache name contains illegal character: '" + c + "', name=\"" + s + "\"" ) ; } } }
Don t accept a cache or manager names with too weird characters .