fix encode null value as empty string for non bag entries

This commit is contained in:
REAndroid 2023-03-16 19:55:30 -04:00
parent a09e487afd
commit 9384cbe483
2 changed files with 6 additions and 1 deletions

View File

@ -74,7 +74,7 @@ class XMLValuesEncoder {
} }
} }
void encodeNullValue(Entry entry){ void encodeNullValue(Entry entry){
// Nothing to do entry.setValueAsString("");
} }
void encodeLiteralEmptyValue(Entry entry, String value){ void encodeLiteralEmptyValue(Entry entry, String value){
entry.setValueAsRaw(ValueType.NULL, 0); entry.setValueAsRaw(ValueType.NULL, 0);

View File

@ -44,4 +44,9 @@ class XMLValuesEncoderBag extends XMLValuesEncoder{
int getChildesCount(XMLElement element){ int getChildesCount(XMLElement element){
return element.getChildesCount(); return element.getChildesCount();
} }
@Override
void encodeNullValue(Entry entry){
// Nothing to do
}
} }