Repository navigation
Commit a029b36
Catch LinkageError in addition to ClassNotFoundErrors.
TestRequestBuilder uses Class.forName to load the legacy
Suppress annotation and other annotation classes.
The call sites currently only catch ClassNotFoundException, but according
to the reference docs Class.forName can also throw LinkageError
e.g. NoClassDefFoundError.
There has been a report of TestRequestBuilder.maybeAddLegacySuppressFilter throwing a fatal NoClassDefFoundError when used with AGP 9.4.0-alpha03. See issuetracker bug 536117227
To make androidx.test.runner more resilient to class loading issues,
this commit expands the catch block to also catch Linkage errors
PiperOrigin-RevId: 9547131131 parent 28113ab commit a029b36
2 files changed
Lines changed: 4 additions & 2 deletions
File tree
- runner/android_junit_runner
- java/androidx/test/internal/runner
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
| 452 | + | |
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
820 | | - | |
| 820 | + | |
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
| |||
0 commit comments