RUMM-2494 Use View hashcode as unique identifier for mapped Wireframe#1037
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## feature/session-replay-vo #1037 +/- ##
==========================================================
Coverage 83.32% 83.32%
==========================================================
Files 327 327
Lines 10454 10454
Branches 1737 1737
==========================================================
Hits 8710 8710
Misses 1208 1208
Partials 536 536 |
xgouchet
approved these changes
Sep 9, 2022
0xnm
approved these changes
Sep 9, 2022
Base automatically changed from
mconstantin/rumm-2424/add-session-replay-v0-privacy-rules
to
feature/session-replay-vo
September 12, 2022 07:37
mariusc83
deleted the
mconstantin/rumm-2494/wireframe-mapper-use-reference-address-as-view-id
branch
September 12, 2022 08:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
In this PR we are fixing the collision problem when taking the screen snapshot as a tree of wireframes. We were currently using the following approach:
return if(view.id!=View.NO_ID) view.id else view.hashCodeto resolve the view unique identifier to be used in the equivalent mappedWireframe. Following our tests we cannot rely on theview.idproperty as this is not unique in a view tree and it can actually be the same for more views in a tree creating collisions.Instead we are going to use the
Viewreference address returned by theView.hashCodefunction. In addition to this in order to avoid problems in case subclasses of theViewclass override thehashCodeclass we will use theSystem.identityHashCodefunction which will always return the default value from the default implementation of thehashCodefunction.Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)