-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
There is an issue in XmlSerializer, it is not able to set the Empty list of statements inside Operation -> inputVariables -> operationVariable -> value -> Entity.
It still serializes the empty statement. The implementation is already with a comment that specifically mentions statements, maybe it needs to do it in a recursive manner.
The exact location of this implementation is here.
Below is the test to reproduce this issue:
public void serializeOperation() throws SerializationException, SAXException {
Operation operation = new DefaultOperation.Builder().idShort("dummyOperation").inputVariables(new DefaultOperationVariable.Builder().value(
new DefaultEntity.Builder().idShort("dummyEntity").build()).build()).build();
Submodel submodel = new DefaultSubmodel.Builder().id("dummySubmodel").idShort("dummySubmodel")
.submodelElements(operation).build();
String xml = new XmlSerializer().write(new DefaultEnvironment.Builder().submodels(submodel).build());
}
Note: We checked just the above scenario, maybe the root cause is different or there could be another scenarios where this issue is reproducible.
Metadata
Metadata
Assignees
Labels
No labels