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

Ensure no Java 8 method reference sugar is used for Android #2857

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

markushi
Copy link
Member

@markushi markushi commented Jul 20, 2023

📜 Description

As discussed, let's try to avoid using methods refs for code which gets executed on the Android platform.

💡 Motivation and Context

Fixes #2848

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Jul 20, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 320.59 ms 342.88 ms 22.29 ms
Size 1.72 MiB 2.29 MiB 575.23 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
adf8fe3 300.49 ms 357.36 ms 56.87 ms
f60279b 324.60 ms 345.33 ms 20.73 ms
dc67004 273.86 ms 346.37 ms 72.51 ms
d0c08e7 310.28 ms 350.68 ms 40.40 ms
c03a05e 390.40 ms 419.35 ms 28.94 ms
f274c79 313.96 ms 355.96 ms 42.00 ms
f274c79 334.86 ms 348.54 ms 13.68 ms
caf50ec 302.36 ms 325.25 ms 22.89 ms
9246ed4 281.79 ms 352.08 ms 70.29 ms
0310da5 381.20 ms 404.50 ms 23.30 ms

App size

Revision Plain With Sentry Diff
adf8fe3 1.72 MiB 2.29 MiB 575.24 KiB
f60279b 1.72 MiB 2.29 MiB 575.23 KiB
dc67004 1.72 MiB 2.28 MiB 573.45 KiB
d0c08e7 1.72 MiB 2.29 MiB 574.68 KiB
c03a05e 1.72 MiB 2.29 MiB 574.43 KiB
f274c79 1.72 MiB 2.29 MiB 575.01 KiB
f274c79 1.72 MiB 2.29 MiB 575.01 KiB
caf50ec 1.72 MiB 2.29 MiB 575.24 KiB
9246ed4 1.72 MiB 2.28 MiB 572.22 KiB
0310da5 1.72 MiB 2.28 MiB 573.45 KiB

@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f60279b) 81.37% compared to head (60f8e38) 81.37%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2857   +/-   ##
=========================================
  Coverage     81.37%   81.37%           
- Complexity     4633     4635    +2     
=========================================
  Files           354      354           
  Lines         17064    17064           
  Branches       2307     2307           
=========================================
  Hits          13885    13885           
  Misses         2229     2229           
  Partials        950      950           
Impacted Files Coverage Δ
sentry/src/main/java/io/sentry/HostnameCache.java 90.69% <ø> (ø)
...ry/src/main/java/io/sentry/SentryEnvelopeItem.java 88.31% <ø> (ø)
...rc/main/java/io/sentry/JsonObjectDeserializer.java 90.32% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@stefanosiano
Copy link
Member

possibly fixes #2848

@markushi markushi changed the title Fix ensure no method refs are not used on Android Ensure no Java 8 method reference sugar is used for Android Jul 20, 2023
@markushi markushi merged commit 0bff5c1 into main Jul 20, 2023
@markushi markushi deleted the fix/no-method-refs-android branch July 20, 2023 10:56
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.

Replace all usages of method references (aka ::) with lambdas
3 participants