#40 Fix NPE in Result.getReportDocument for malformed xml input

This commit is contained in:
Andreas Penski (init) 2020-01-06 09:10:45 +01:00
parent b44603b55f
commit da70421620
9 changed files with 74 additions and 44 deletions

View file

@ -94,7 +94,7 @@ public abstract class BaseScenario {
* @return das passende Schema
*/
public Schema getSchema() {
if (this.schema == null) {
if (this.schema == null && getValidateWithXmlSchema() != null) {
final List<String> schemaResources = getValidateWithXmlSchema().getResource().stream().map(ResourceType::getLocation)
.collect(Collectors.toList());
this.schema = this.repository.createSchema(schemaResources);