Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

21 test fix #391

Open
wants to merge 6 commits into
base: staging
Choose a base branch
from
Open

21 test fix #391

wants to merge 6 commits into from

Conversation

arifBurakDemiray
Copy link
Member

No description provided.

Copy link

github-actions bot commented Sep 11, 2024

Unit Test Results 🚀

658 tests  ±0   657 ✅ ±0   3m 3s ⏱️ +4s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     1 ❌ ±0 

For more details on these failures, see this check.

Results for commit 42523dc. ± Comparison against base commit eefbdfb.

♻️ This comment has been updated with latest results.

@arifBurakDemiray arifBurakDemiray marked this pull request as draft September 11, 2024 08:16
@arifBurakDemiray arifBurakDemiray marked this pull request as ready for review September 11, 2024 10:30
@@ -49,8 +50,14 @@ public void tearDown() {
assertEquals(req2, reqs1[1]);
assertEquals(req3, reqs1[2]);

req3 = "ff=bb&68=45&device_id=55";
req2 += "&old_device_id=" + did;
if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT <= 25) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this one about

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know after 25 they probably changed iteration for maps

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be documentation somewhere about it. would be nice if you find. Also isnt 21 our min target, ide giving error when you omit that check?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeap 21 is our min target, is it Interesting it does not give on my side

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In API level 21, both HashMap and ConcurrentHashMap rely purely on a linked-list-based structure to resolve hash collisions (i.e., chaining). Migrating key-value pairs from ConcurrentHashMap to HashMap could lead to different bucket placements due to different internal bucket sizing, hash functions, or the way collisions are resolved.

Starting with Java 8 (introduced in Android API level 24), HashMap and ConcurrentHashMap both use improved hashing strategies and adopt tree-based nodes (red-black trees) for handling hash collisions when a bucket contains many entries. This makes the bucket handling more predictable and consistent, especially when the map grows or experiences collisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants