Repository navigation
Commit 40c9b1e
ref(android): Fix Error Prone warnings in sentry-android-core (#6499)
* ref(android): Fix Error Prone warnings in sentry-android-core
Error Prone never ran on sentry-android-core. Enabling it reports 59 warnings outside Javadoc,
which fail the build under -Werror.
- Suppress FutureReturnValueIgnored, JavaUtilDate, and ReferenceEquality where identity is
intended, as the sentry module does.
- Keep the AnrProfilingIntegration updater a field, since removeCallbacks needs the instance that
was posted, and suppress UnnecessaryLambda there.
- Read the ANR thread dump and the app start profiling config as UTF-8, Android's default charset.
- Remove unused fields and parameters, add missing @OverRide, make long-to-double conversions
explicit, and narrow members that are effectively private or protected in a final class.
- Explain the two catch blocks that ignore their exception.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ref(android): Fix the Error Prone warnings only main has
- ANRWatchDog.monotonicTicker is never read (#6041), since the ticker lambda captures the
constructor parameter. Remove the field and keep the parameter.
- ActivityFramesTracker.lock is protected in a final class; make it package-private.
- LifecycleWatcher reads the session start Date to seed the session window; suppress JavaUtilDate
there, as the other Date uses are.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ref(android): Keep the default charset reads as they were
Android's default charset is always UTF-8, so DefaultCharset is
disabled for the Android modules in #6493 instead of being fixed here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ref(android): Drop the UnnecessaryLambda suppressions
#6493 disables UnnecessaryLambda for the Android modules, so the
suppressions on the ANRWatchDog and AnrProfilingIntegration fields
are redundant.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ref(android): Drop the updater field comment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(android): Make the local-class method comment a plain comment
Error Prone's NotJavadoc flags Javadoc on methods of local classes, which
#6537 added in AndroidConnectionStatusProvider.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 1c8f695 commit 40c9b1e
38 files changed
Lines changed: 59 additions & 31 deletions
File tree
- sentry-android-core/src/main/java/io/sentry/android/core
- anr
- internal
- gestures
- modules
- threaddump
- util
- performance
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | | - | |
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
| |||
97 | 95 | | |
98 | 96 | | |
99 | 97 | | |
100 | | - | |
101 | 98 | | |
102 | 99 | | |
103 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
| 499 | + | |
499 | 500 | | |
500 | 501 | | |
501 | 502 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
338 | 339 | | |
339 | 340 | | |
340 | 341 | | |
| |||
373 | 374 | | |
374 | 375 | | |
375 | 376 | | |
| 377 | + | |
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 62 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | | - | |
| 505 | + | |
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
0 commit comments