Skip to content

Commit

Permalink
Merge pull request quarkusio#28935 from Sgitario/28922
Browse files Browse the repository at this point in the history
Prevent NPE in setAllHeaders
  • Loading branch information
geoand authored Oct 31, 2022
2 parents dc885ff + 1d074d6 commit d4d05b5
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,11 @@ public <T extends ResponseImpl> T populateResponse(T response, boolean copyHeade
}

public void setAllHeaders(MultivaluedMap<String, String> values) {
for (Map.Entry<String, List<String>> i : values.entrySet()) {
for (String v : i.getValue()) {
metadata.add(i.getKey(), v);
if (values != null) {
for (Map.Entry<String, List<String>> i : values.entrySet()) {
for (String v : i.getValue()) {
metadata.add(i.getKey(), v);
}
}
}
}
Expand Down

0 comments on commit d4d05b5

Please sign in to comment.