code: private static BiFunction<AnnotatedValueResolver, ResolverContext, Object>
      resolver(Function<ResolverContext, List<String>> getter, Supplier<String> failureMessageSupplier) {
          return (resolver, ctx) -> {
              final List<String> values = getter.apply(ctx);
              if (!resolver.hasContainer()) {
                  if (values != null && !values.isEmpty()) {
                      return resolver.convert(values.get(0));
                  }
                  return resolver.defaultOrException();
              }
  
              try {
                  assert resolver.containerType() != null;
                  @SuppressWarnings("unchecked")
                  final Collection<Object> resolvedValues =
                          (Collection<Object>) resolver.containerType().getDeclaredConstructor().newInstance();
  
                  // Do not convert value here because the element type is String.
                  if (values != null && !values.isEmpty()) {
                      values.stream().map(resolver::convert).forEach(resolvedValues::add);
                  } else {
                      final Object defaultValue = resolver.defaultOrException();
                      if (defaultValue != null) {
                          resolvedValues.add(defaultValue);
                      }
                  }
                  return resolvedValues;
              } catch (Throwable cause) {
                  throw new IllegalArgumentException(failureMessageSupplier.get(), cause);
              }
          };
      }
docs: Returns a collection value resolver which retrieves a list of string from the specified {@code getter}
  and adds them to the specified collection data type.