code: public static Map<String, Object> getRequestParameters(final Collection<String> attributes, final HttpServletRequest context) {
          return attributes.stream()
              .filter(a -> StringUtils.isNotBlank(context.getParameter(a)))
              .map(m -> {
                  val values = context.getParameterValues(m);
                  val valuesSet = new LinkedHashSet<Object>();
                  if (values != null && values.length > 0) {
                      Arrays.stream(values).forEach(v -> valuesSet.addAll(Arrays.stream(v.split(" ")).collect(Collectors.toSet())));
                  }
                  return Pair.of(m, valuesSet);
              })
              .collect(Collectors.toMap(Pair::getKey, Pair::getValue));
      }
docs: Gets attributes.
  
  @param attributes the attributes
  @param context    the context
  @return the attributes