code: static String resolveArgument(String[] args) {
      return Optional.ofNullable(args).map(ArrayUtils::getFirst).filter(StringUtils::hasText)
        .orElseThrow(() -> newIllegalArgumentException("Directory is required"));
    }
docs: /* (non-Javadoc)