Skip to content

Commit

Permalink
Improve hidden metadata check
Browse files Browse the repository at this point in the history
  • Loading branch information
BartChris committed Oct 1, 2024
1 parent d5b508f commit 8f39a4f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -685,12 +685,12 @@ public void preserve() throws InvalidMetadataValueException, NoSuchMetadataField
metadata.addAll(row.getMetadataWithFilledValues());
}
}
if (Objects.nonNull(hiddenMetadata)) {
if (!hiddenMetadata.isEmpty()) {
for (Metadata hiddenmetadatum : hiddenMetadata) {
if (hiddenmetadatum instanceof MetadataEntry
&& specialFields.contains(hiddenmetadatum.getKey())) {
updateDivision(hiddenmetadatum.getKey(), ((MetadataEntry) hiddenmetadatum).getValue());
if (hiddenMetadata != null && !hiddenMetadata.isEmpty()) {
for (Metadata hidden : hiddenMetadata) {
if (hidden instanceof MetadataEntry) {
MetadataEntry entry = (MetadataEntry) hidden;
if (specialFields.contains(entry.getKey())) {
updateDivision(entry.getKey(), entry.getValue());
}
}
}
Expand Down

0 comments on commit 8f39a4f

Please sign in to comment.