Skip to content

Commit

Permalink
Prevent null pointer in setAllHeaders
Browse files Browse the repository at this point in the history
I didn't add any test to cover this change because it's easier to fix than to replicate the conditions to reproduce it in either the extension or an integration test than expected taking into account we have a reproducer.
Still let me know if you want it to cover it and maybe I can add wiremock in the integration-tests/rest-client-reactive. 
Fix quarkusio#28922
  • Loading branch information
Sgitario committed Oct 31, 2022
1 parent 95db648 commit 1d074d6
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 1d074d6

Please sign in to comment.