Skip to content

Commit

Permalink
Fix NPE, URLConnection has null key header
Browse files Browse the repository at this point in the history
  • Loading branch information
sfuhrm committed Jul 23, 2023
1 parent 5963bf3 commit 6b9d248
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public InputStream openStream(HttpConnection connection) throws IOException {
Map<String,List<String>> headers = headersOriginal
.entrySet()
.stream()
.filter(e -> e.getKey() != null)
.collect(Collectors.toMap(e -> e.getKey().toLowerCase(), e -> e.getValue()));
if (headers.containsKey(ICY_NAME)) {
metaData.setStationName(Optional.of(headers.get(ICY_NAME).get(0)));
Expand Down

0 comments on commit 6b9d248

Please sign in to comment.