code: public static MultivaluedMap<String, String> decodeQuery(String q, boolean decodeNames, boolean decodeValues) {
          // EMODB-MODIFICATION Replaced with EmoMultivaluedMap implementation
          MultivaluedMap<String, String> queryParameters = EmoMultivaluedMap.create();
  
          if (q == null || q.length() == 0) {
              return queryParameters;
          }
  
          int s = 0;
          do {
              int e = q.indexOf('&', s);
  
              if (e == -1) {
                  decodeQueryParam(queryParameters, q.substring(s), decodeNames, decodeValues);
              } else if (e > s) {
                  decodeQueryParam(queryParameters, q.substring(s, e), decodeNames, decodeValues);
              }
              s = e + 1;
          } while (s > 0 && s < q.length());
  
          return queryParameters;
      }
docs: Decode the query component of a URI.
  <p>
  Decoding of query parameter names and values can be controlled using the {@code decodeNames}
  and {@code decodeValues} parameter flags.
  </p>
  
  @param q            the query component in encoded form.
  @param decodeNames  {@code true} if the returned query parameter names of the query component
  should be in decoded form.
  @param decodeValues {@code true} if the returned query parameter values of the query component
  should be in decoded form.
  @return the multivalued map of query parameters.