Fix getSignalsMatching when passed V1 as version + minor refactor #86
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.
Problem:
getSignalsMatching(V1, Stable/Optimal)
returned a wrong list of signals, because this method did not take into account that when usingV1
version, some signals should be treated asStable
even if their stability level isOptimal/Unique
.What is affected
The problem did not affect our backward compatibility with older fingerprints, because the method
Fingerprinter.getFingerprint(..)
internally did not usegetSignalsMatching
for versions representing legacy fingerprint scheme (v1..v4) and already respected the rule described above.Therefore, the only way to experience the problem was to use
getSignalsMatching(V1, Stable/Optimal)
directly, and Ihighly doubt that someone uses
V1
for this purpose nowadays :) However, one could observe this bug when trying our demo app if the following steps were made:One could see that the fingerprint remains the same, even though the list of signals actually does change. After the fix, during the same steps the list of signals will remain the same as it should.