code: public static List<String> determineRestrictFields(MultiValueMap<String, String> requestedFilter, Class<?> entityClass) {
          if (requestedFilter == null) {
              return null;
          }
          List<String> restrictFieldsTo = null;
          Set<String> keys = requestedFilter.keySet();
          for (String key : keys) {
              if (RESTRICT_FIELDS_PARAM.equalsIgnoreCase(key)) {
                  restrictFieldsTo = listFromCommaSeparatedStringList(
                      requestedFilter.get(key)
                  );
              }
          }
          if (restrictFieldsTo == null) {
              return null;
          }
  
          List<String> restrictableFieldNames = getFilterableOrRestrictableFieldNames(entityClass);
          List<String> filteredRestrictTo = new ArrayList<String>();
  
          for (String restrictableFieldName : restrictableFieldNames) {
              for (String requestedRestrictTo : restrictFieldsTo) {
                  if (restrictableFieldName.equalsIgnoreCase(requestedRestrictTo)) {
                      filteredRestrictTo.add(restrictableFieldName);
                  }
              }
          }
  
          if (filteredRestrictTo.size() == 0) {
              filteredRestrictTo = null;
          }
  
          return filteredRestrictTo;
      }
docs: Returns a list of fieldnames to restrict the output to. This list is the
  intersection of fields that are possible to be restricted and the names
  that are actually requested in the <code>requestedFilter</code>.
  <p>
  Only the key {@value RESTRICT_FIELDS_PARAM} is taken as list of requested
  fieldName to restrict by, the value is treated in a case-insensitive matter.
  <p>
  The returned list will have casing as they appear in the class, regardless
  of the case of the values that appear in <code>RESTRICT_FIELDS_PARAM</code>.
  
  @param requestedFilter
  @param entityClass