You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AssetAdministrationShellEnvironmentSerializer has an side effect on the Environment that is being serialized and thus it is broken afterwards.
It's not possible to serialize it a second time, e.g. to write both XML and AASX files.
The problematic part of the code is the following (line 125ff):
private void writeWrappedArray(ToXmlGenerator xgen, QName wrapper, QName wrapped, List<?> list)
throws IOException {
// overwrite all empty list with null, as the schema does not allow empty XML lists
for (Object obj : list) ReflectionHelper.setEmptyListsToNull(obj);
The comment explains the measure, however the serializer should handle this issue differently. If this is not possible it probably would be best to keep track of which fields have been replaced with null and revert the change afterwards.
The text was updated successfully, but these errors were encountered:
The
AssetAdministrationShellEnvironmentSerializer
has an side effect on theEnvironment
that is being serialized and thus it is broken afterwards.It's not possible to serialize it a second time, e.g. to write both XML and AASX files.
The problematic part of the code is the following (line 125ff):
The comment explains the measure, however the serializer should handle this issue differently. If this is not possible it probably would be best to keep track of which fields have been replaced with
null
and revert the change afterwards.The text was updated successfully, but these errors were encountered: