code: public String getPrincipal() {
          String principal = target.getPrincipal();
          if (StringUtils.hasText(principal)) {
              return principal;
          } else {
              return defaultUser;
          }
      }
docs: Checks if the target's principal is not empty; if not, this is returned -
  otherwise return the <code>defaultPassword</code>.
  
  @return the target's principal if it is not empty, the
  <code>defaultPassword</code> otherwise.