Commit 799a2e6
authored
Removal of lang_string_set_to_xml (dead code) (#457)
Previously, the serialization of `adapter.xml` uses the general
`object_to_xml_element()` method. In it, there was branch to a call of
`lang_string_set_to_xml()` without setting the tag parameter, which
would have caused an exception, if the code was ever run.
We decided to remove the call of `lang_string_set_to_xml` completely as
this specific case in `object_to_xml()` is considered dead code, as the
XML tag for a `LangStringSet` varies based on its context
(the tag is determined by the *parent's* attribute), it must always be
called explicitly with a tag parameter by the *parent's serialization
logic*. Since there is no scenario where a `LangStringSet` is
serialized in isolation (It **cannot** be a standalone xml object),
this branch is unreachable and should be removed to maintain code
cleanliness.
Fixes #3971 parent aeb1b78 commit 799a2e6
1 file changed
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
899 | 899 | | |
900 | 900 | | |
901 | 901 | | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | 902 | | |
907 | 903 | | |
908 | 904 | | |
| |||
0 commit comments