Do not use hash code for LinkAddress comparison
CompareOrUpdateResult cannot use hash code because the key function must return a unique result for every object. The previous iteration of this code performed an equals comparison on a hash code int rather than the individual elements themselves. This can lead to hash code collisions for LinkAddresses which are otherwise unrelated (i.e. not equal). For example, if there is a collision in the collection of oldItems, CompareOrUpdateResult will collapse the items into one (by overriding all previous items with the same hash code) which affects the subsequent comparison with newItems. Test: TH Flag: EXEMPT trivial bug fix Change-Id: I8778bf48e3b550dbeaa75ee8b5b3b3178b874741
Loading
Please register or sign in to comment