Master branch updates from beta September 2023 #337

Manually merged
claudio.atzori merged 1271 commits from beta into master 2023-09-06 11:31:09 +02:00
2 changed files with 2 additions and 5 deletions
Showing only changes of commit b99a011345 - Show all commits

View File

@ -143,7 +143,7 @@ public abstract class AbstractMdRecordToOafMapper {
return createOafs(doc, type, instances, collectedFrom, info, lastUpdateTimestamp);
} catch (DocumentException e) {
log.error("Error with record:\n" + xml);
throw e;
return Lists.newArrayList();
}
}

View File

@ -931,11 +931,8 @@ class MappersTest {
void testNotWellFormed() throws IOException, DocumentException {
final String xml = IOUtils
.toString(Objects.requireNonNull(getClass().getResourceAsStream("oaf_notwellformed.xml")));
final DocumentException generalEx = new DocumentException();
assertEquals(0, new OafToOafMapper(vocs, false, true).processMdRecord(xml).size());
DocumentException exception = assertThrows(DocumentException.class, () -> {
new OafToOafMapper(vocs, false, true).processMdRecord(xml);
});
}
private void assertValidId(final String id) {