* @param containerRequest container request to put {@link Form} property to.
*/
private void filterFormParameters(HttpServletRequest servletRequest, ContainerRequest containerRequest) {
if (MediaTypes.typeEqual(MediaType.APPLICATION_FORM_URLENCODED_TYPE, containerRequest.getMediaType())
&& !containerRequest.hasEntity()) {
final Form form = new Form();
final Enumeration parameterNames = servletRequest.getParameterNames();
while (parameterNames.hasMoreElements()) {
final String name = (String) parameterNames.nextElement();
final String[] values = servletRequest.getParameterValues(name);
form.asMap().put(name, Arrays.asList(values));
}
if (!form.asMap().isEmpty()) {
containerRequest.setProperty(InternalServerProperties.FORM_DECODED_PROPERTY, form);
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.log(Level.WARNING, LocalizationMessages.FORM_PARAM_CONSUMED(containerRequest.getRequestUri()));
}