Closed NeumannJoerg closed 7 months ago
Adjusted the constructor. Data is now cloned into a newly created data reference, which avoids the issue.
The new test method lcl_unit_tests_serialization->test_keeps_deep_struc_values will prevent a regression in subsequent releases.
The data of deep structures might be lost, in some cases. The following test report reproduces the issue.
The debugger reveals, that the data is temporarily available inside the constructor.
Right after leaving the constructor, the data reference inside the data container will still be bound, but the dereferrenced structure will be initial!
The constructor of the class should be adjusted to avoid unexpected loss of data. Replacing this
with that
fixes the issue.
This might not be ideal in terms of performance, so this might be changed again in the future, but for now I'd rather accept an insignificant hit to performance than an unexpected loss of data.