Skip to content

Commit

Permalink
Fix FORM_PARAM_CONSUMED warning (#5208)
Browse files Browse the repository at this point in the history
Co-authored-by: Maxim Nesen <24524084+senivam@users.noreply.github.com>
  • Loading branch information
dosy4ev and senivam authored Dec 7, 2022
1 parent c30060f commit 8c731ee
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -603,7 +603,11 @@ private void filterFormParameters(final HttpServletRequest servletRequest, final
final String name = (String) parameterNames.nextElement();
final List<String> values = Arrays.asList(servletRequest.getParameterValues(name));

formMap.put(name, keepQueryParams ? values : filterQueryParams(name, values, queryParams));
final List<String> filteredValues = keepQueryParams ? values : filterQueryParams(name, values, queryParams);

if (!filteredValues.isEmpty()) {
formMap.put(name, filteredValues);
}
}

if (!formMap.isEmpty()) {
Expand Down

0 comments on commit 8c731ee

Please sign in to comment.