Skip to content

Commit

Permalink
Merge pull request #213 from oleg-nenashev/findbugs-cleanup/JENKINS-3…
Browse files Browse the repository at this point in the history
…7566-inefficient-iterator

[JENKINS-37566] - FindBugs: Stop using inefficient iterator logic.
  • Loading branch information
oleg-nenashev committed Nov 10, 2017
2 parents e733f70 + 274d425 commit 9bbab05
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -473,9 +473,10 @@ static boolean inNoProxyEnvVar(String host) {
private static List<String> header(@Nonnull HttpURLConnection connection, String... headerNames) {
Map<String, List<String>> headerFields = connection.getHeaderFields();
for (String headerName : headerNames) {
for (String headerField : headerFields.keySet()) {
for (Map.Entry<String, List<String>> entry: headerFields.entrySet()) {
final String headerField = entry.getKey();
if (headerField != null && headerField.equalsIgnoreCase(headerName)) {
return headerFields.get(headerField);
return entry.getValue();
}
}
}
Expand Down

0 comments on commit 9bbab05

Please sign in to comment.