Fix null asset mapping exception on text unit mapping stage #188
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.
During the text unit mapping stage of a third party sync: If the third party TMS returned a text unit that had an asset path that was never seen in Mojito the mapping would fail as the key would be null which is not allowed in a Map.
The idea was already there to filter out text units that have a null key for their asset but that would never be reached because of the above exception.
This is only really a problem for dev instances (cold starts) that are pushing assets and doing a third party sync where the asset stored in the third party TMS doesn't exist locally.
I have tested this by performing a full third party sync and the hash codes / TMS mappings are present on the text units.