code: static void checkInternalName(final String name, final String msg) {
          if (name == null || name.length() == 0) {
              throw new IllegalArgumentException("Invalid " + msg
                      + " (must not be null or empty)");
          }
          if (name.charAt(0) == '[') {
              checkDesc(name, false);
          } else {
              checkInternalName(name, 0, -1, msg);
          }
      }
docs: Checks that the given string is a valid internal class name.
  
  @param name
  the string to be checked.
  @param msg
  a message to be used in case of error.