Commit 94a93e9
Fix
This is safe, as any instantiated object must have immutable type parameters.
Note: this is only true for `@ImmutableTypeParameter`, not `containerOf`! The latter is conditionally immutable, so we really do need to check the bound.
(And the corresponding change for ThreadSafe.)
PiperOrigin-RevId: 530601585ImmutableChecker to allow wildcard @ImmutableTypeParameters which aren't provably immutable.1 parent b482675 commit 94a93e9
2 files changed
Lines changed: 25 additions & 0 deletions
File tree
- core/src
- main/java/com/google/errorprone/bugpatterns/threadsafety
- test/java/com/google/errorprone/bugpatterns/threadsafety
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
432 | 437 | | |
433 | 438 | | |
434 | 439 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
814 | 834 | | |
815 | 835 | | |
816 | 836 | | |
| |||
0 commit comments