Use enhanced for loop where feasible
See gh-31916
This commit is contained in:
committed by
Stéphane Nicoll
parent
ed1bfb8177
commit
4a450c6fab
@@ -20,7 +20,6 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.net.URI;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import org.eclipse.jetty.client.ContentResponse;
|
||||
@@ -172,9 +171,7 @@ public class JettyXhrTransport extends AbstractXhrTransport implements Lifecycle
|
||||
|
||||
private static HttpHeaders toHttpHeaders(HttpFields httpFields) {
|
||||
HttpHeaders responseHeaders = new HttpHeaders();
|
||||
Iterator<String> names = httpFields.getFieldNamesCollection().iterator();
|
||||
while (names.hasNext()) {
|
||||
String name = names.next();
|
||||
for (String name : httpFields.getFieldNamesCollection()) {
|
||||
Enumeration<String> values = httpFields.getValues(name);
|
||||
while (values.hasMoreElements()) {
|
||||
String value = values.nextElement();
|
||||
|
||||
Reference in New Issue
Block a user