Correct the behavior of adding schematron validation.

During the build, the schematron validation will be added when a schematron is provided in the schematron builder. To ensure the Transformation has been added to the list, the field schematronValidations should be set. Simply return an empty list will in the end ignore the provided schematron.
This commit is contained in:
Wu Yong 吴咏 2024-08-21 11:21:40 +02:00 committed by GitHub
parent 71a705c39d
commit e5507b6a15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,7 +80,10 @@ public class Scenario {
private Transformation reportTransformation;
public List<Transformation> getSchematronValidations() {
return this.schematronValidations == null ? new ArrayList<>() : this.schematronValidations;
if (this.schematronValidations == null) {
this.schematronValidations = new ArrayList<>();
}
return this.schematronValidations;
}
public String getName() {