code: public static void hasLength(@Nullable final String text,
        final Supplier<String> messageSupplier) {
      if (!StringUtils.hasLength(text)) {
        throw new IllegalArgumentException(Assert.nullSafeGet(messageSupplier));
      }
    }
docs: Assert that the given String is not empty; that is, it must not be {@code null} and not the
  empty String.
  
  <pre class="code">
  Assert.hasLength(name, () -&gt; "Name for account '" + account.getId() + "' must not be empty");
  </pre>
  
  @param text the String to check
  @param messageSupplier a supplier for the exception message to use if the assertion fails
  @see StringUtils#hasLength
  @throws IllegalArgumentException if the text is empty
  @since 5.0