docs: private static Set<Credential> sanitizeCredentials(final Credential[] credentials) {
          if (credentials != null && credentials.length > 0) {
              return Arrays.stream(credentials)
                  .filter(Objects::nonNull)
                  .collect(Collectors.toCollection(LinkedHashSet::new));
          }
          return new HashSet<>(0);
      }