Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before submission, please check that ...
Description
This is somewhat caused by #748 which destroys the attribute differences.
When performing the autohealing tutorial applying the text attribute difference (which is an identifying attribute) results in an exception reported, because the attribute is missing and cannot be applied.
Fix
The changes in #748 causes the attribute difference to be reconstructed. This destroys any special attribute differences (e.g.
AdditionalAttributeDifference
), which are used to convey additional meaning to theIdentifyingAttributes
apply mechanism.This was used to pass the original inserted attribute along and ignore the missing
null
attribute to simply create a new attribute (seeAdditionalAttributeDifference
). However, decided to custom handle the insertion of a (identifying) attribute the following:State of this PR
I decided not to revert or adjust the changes made by the causing PR, since most custom
AttributeDifferences
are related to legacy code (to my understanding) and should not be created. The remaining differences (mostlyAdditionalAttributeDifference
) should not require special handling (besides the one to be introduced).Additional Context
This bug has happened a few times in the past and couldn't be reproduced, since it seemed to happen only on edge cases. I hope, that this fix also fixes those cases.