|
10 | 10 | import java.util.Collections;
|
11 | 11 | import java.util.Enumeration;
|
12 | 12 | import java.util.HashMap;
|
| 13 | +import java.util.Iterator; |
13 | 14 | import java.util.List;
|
14 | 15 | import java.util.Map;
|
15 | 16 | import java.util.concurrent.CompletableFuture;
|
@@ -185,8 +186,8 @@ public Iterable<Map.Entry<String, String>> getAllRequestHeaders() {
|
185 | 186 | Enumeration<String> headerNames = request.getHeaderNames();
|
186 | 187 | while (headerNames.hasMoreElements()) {
|
187 | 188 | String name = headerNames.nextElement();
|
188 |
| - for (String v : new EnumerationIterable<>(request.getHeaders(name))) { |
189 |
| - ret.add(new MapEntry<>(name, v)); |
| 189 | + for (Iterator<String> headers = request.getHeaders(name).asIterator(); headers.hasNext();) { |
| 190 | + ret.add(new MapEntry<>(name, headers.next())); |
190 | 191 | }
|
191 | 192 | }
|
192 | 193 | return ret;
|
@@ -272,7 +273,7 @@ public List<String> getAllQueryParams(String name) {
|
272 | 273 | * {@link Map<String, List<String>>}, where the keys are parameter names
|
273 | 274 | * and the values are lists of parameter values. This allows parameters
|
274 | 275 | * to be extracted from the URL without knowing their names in advance.
|
275 |
| - * |
| 276 | + * <p> |
276 | 277 | * The method is used by {@link ParameterExtractor}, which works with characteristics
|
277 | 278 | * such as parameter name, single/multiple values, and encoding. Since it's
|
278 | 279 | * not always possible to distinguish between {@link Map} and {@link MultivaluedMap},
|
|
0 commit comments