code: 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 + "\"");
        }
      }
    }
docs: Don't accept a cache or manager names with too weird characters.
  
  @see org.cache2k.Cache2kBuilder#name(String)