use of io.undertow.servlet.util.IteratorEnumeration in project undertow by undertow-io.
the class HttpServletRequestImpl method getParameterNames.
@Override
public Enumeration<String> getParameterNames() {
if (queryParameters == null) {
queryParameters = exchange.getQueryParameters();
}
final Set<String> parameterNames = new HashSet<>(queryParameters.keySet());
final FormData parsedFormData = parseFormData();
if (parsedFormData != null) {
Iterator<String> it = parsedFormData.iterator();
while (it.hasNext()) {
String name = it.next();
for (FormData.FormValue param : parsedFormData.get(name)) {
if (!param.isFileItem()) {
parameterNames.add(name);
break;
}
}
}
}
return new IteratorEnumeration<>(parameterNames.iterator());
}
Aggregations