/** * A method for parsing of the query into name-value pairs. The return * value is turned into an immutable map and cached. * <p>Note that this method is invoked lazily on first access to * {@link #getQueryParams()}. The invocation is not synchronized but the * parsing is thread-safe nevertheless. */ protected MultiValueMap<String, String> initQueryParams() { MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>(); String query = getURI().getRawQuery(); if (query != null) { Matcher matcher = QUERY_PATTERN.matcher(query); while (matcher.find()) { String name = decodeQueryParam(matcher.group(1)); String eq = matcher.group(2); String value = matcher.group(3); value = (value != null ? decodeQueryParam(value) : (StringUtils.hasLength(eq) ? "" : null)); queryParams.add(name, value); } } return queryParams; }
/** * A method for parsing of the query into name-value pairs. The return * value is turned into an immutable map and cached. * <p>Note that this method is invoked lazily on first access to * {@link #getQueryParams()}. The invocation is not synchronized but the * parsing is thread-safe nevertheless. */ protected MultiValueMap<String, String> initQueryParams() { MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>(); String query = getURI().getRawQuery(); if (query != null) { Matcher matcher = QUERY_PATTERN.matcher(query); while (matcher.find()) { String name = decodeQueryParam(matcher.group(1)); String eq = matcher.group(2); String value = matcher.group(3); value = (value != null ? decodeQueryParam(value) : (StringUtils.hasLength(eq) ? "" : null)); queryParams.add(name, value); } } return queryParams; }
/** * A method for parsing of the query into name-value pairs. The return * value is turned into an immutable map and cached. * <p>Note that this method is invoked lazily on first access to * {@link #getQueryParams()}. The invocation is not synchronized but the * parsing is thread-safe nevertheless. */ protected MultiValueMap<String, String> initQueryParams() { MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>(); String query = getURI().getRawQuery(); if (query != null) { Matcher matcher = QUERY_PATTERN.matcher(query); while (matcher.find()) { String name = decodeQueryParam(matcher.group(1)); String eq = matcher.group(2); String value = matcher.group(3); value = (value != null ? decodeQueryParam(value) : (StringUtils.hasLength(eq) ? "" : null)); queryParams.add(name, value); } } return queryParams; }