added getOrDefault value for IGNORE_ERRORS

This commit is contained in:
Francesco Mangiacrapa 2024-05-10 11:52:36 +02:00
parent 9a563d578e
commit e11a9a49dc
2 changed files with 7 additions and 8 deletions

View File

@ -203,9 +203,9 @@ public class SimpleLifeCycleManager extends AbstractLifeCycleManager implements
log.info("Requesting dematerialization for {} ",s);
for(MaterializationPlugin mat : getMaterializers(report.getTheRequest())) {
Document params = new Document("fileSetPath",s);
Boolean ignoreErrors = false;
Boolean ignoreErrors;
try {
ignoreErrors = (Boolean) report.getTheRequest().getCallParameters().get(InterfaceConstants.Parameters.IGNORE_ERRORS);
ignoreErrors = (Boolean) report.getTheRequest().getCallParameters().getOrDefault(InterfaceConstants.Parameters.IGNORE_ERRORS, false);
}catch (Exception e) {
ignoreErrors = false;
}

View File

@ -219,10 +219,9 @@ public class SDIMaterializerPlugin extends AbstractPlugin implements Materializa
log.info("Serving DeMaterialize {} : request CallParameters {}, request Context {}: ",this.getDescriptor().getId(), request.getCallParameters(), request.getContext());
log.debug("DeMaterialize request {}",request);
MaterializationReport report= new MaterializationReport(request);
Boolean ignoreErrors = false;
Boolean ignoreErrors;
try {
ignoreErrors = (Boolean) request.getCallParameters().get(InterfaceConstants.Parameters.IGNORE_ERRORS);
log.info("Serving DeMaterialize with {} as: {} ",InterfaceConstants.Parameters.IGNORE_ERRORS, ignoreErrors);
ignoreErrors = (Boolean) report.getTheRequest().getCallParameters().getOrDefault(InterfaceConstants.Parameters.IGNORE_ERRORS, false);
}catch (Exception e) {
ignoreErrors = false;
}