code: private void validateUsername() {
          final String usernameValue = getUserName();
          if (StringUtils.isBlank(usernameValue)) {
              final String msg =
                      "Username cannot be blank;  check configuration "
                              + "of user attributes and their data sources.";
              throw new IllegalStateException(msg);
          }
      }
docs: This method helps the PersonImpl <i>fail fast</i> if it is initialized in an invalid state.
  An instance of this class that does not have a value for <code>IPerson.USERNAME</code> cannot
  function properly. It would be unusable for groups, permissions, layouts, authenticated
  status, and probably a whole host of other things. It's best if we raise the alarm
  immediately, otherwise the issue may be much more time consuming to troubleshoot if it slips
  downstream.