Skip to content

Commit

Permalink
fixes #471 by avoiding NPE when mappableMetadata is null
Browse files Browse the repository at this point in the history
  • Loading branch information
olli-gold committed Oct 22, 2024
1 parent 0dc31d5 commit aef2bdc
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ protected void addAndHandleException(
}

private void indexBitstreamsMetadatadas(SolrInputDocument document, Bitstream bitstream) {
if (mappableMetadata != null) {
bitstream
.getMetadata()
.stream()
Expand All @@ -190,6 +191,7 @@ private void indexBitstreamsMetadatadas(SolrInputDocument document, Bitstream bi
.orElseGet(() -> new SolrFieldMetadataMapper(metadataField.toString(), bitstreamMetadataIndexAdder))
.map(document, metadata.getValue());
});
}
}

public void setMappableMetadata(Map<String, SolrFieldMetadataMapper> mappableMetadata) {
Expand Down

0 comments on commit aef2bdc

Please sign in to comment.