Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public Iterator<String> getResponseHeaderNames() throws IOException {
@Override
public Iterator<String> getResponseHeaders(String name) throws IOException {
List<String> headers = response.getHeaders().get(name);
return headers != null ? headers.iterator() : Collections.<String> emptyList().iterator();
return headers != null ? headers.iterator() : Collections.emptyIterator();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public Iterator<String> getResponseHeaders(String name) throws IOException {
List<String> headerValues = headersListMappedByLowerCaseName.get(name.toLowerCase());

if (headerValues == null) {
return Collections.<String> emptyList().iterator();
return Collections.emptyIterator();
} else {
return headerValues.iterator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public Iterator<String> getRequestHeaderNames() throws IOException {
@Override
public Iterator<String> getRequestHeaders(String name) throws IOException {
List<String> headers = httpExchange.getRequestHeaders().get(name);
return headers != null ? headers.iterator() : Collections.<String> emptyList().iterator();
return headers != null ? headers.iterator() : Collections.emptyIterator();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static Iterator<String> getHeaders(Message message, String name) throws J
if (value != null) {
return Collections.singletonList(value).iterator();
} else {
return Collections.<String> emptyList().iterator();
return Collections.emptyIterator();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static Iterator<String> getHeaders(Message message, String name) {
if (value != null) {
return Collections.singletonList(value).iterator();
} else {
return Collections.<String> emptyList().iterator();
return Collections.emptyIterator();
}
}

Expand Down