Commit 90e4a60
bugfix: false positive in AnnotateNullableParameters when parameter … (#865)
* bugfix: false positive in AnnotateNullableParameters when parameter is dereferenced before null check
* Check all arguments for null-checked parameters
Addresses review feedback: custom null-checkers may accept the parameter in a position other than first (e.g., `assertNotNull(message, param)`).
---------
Co-authored-by: stefanod <stefano.dallapalma@adyen.com>
Co-authored-by: Tim te Beek <tim@moderne.io>1 parent b315bbc commit 90e4a60
2 files changed
Lines changed: 33 additions & 6 deletions
File tree
- src
- main/java/org/openrewrite/staticanalysis
- test/java/org/openrewrite/staticanalysis
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
323 | | - | |
324 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
325 | 327 | | |
326 | | - | |
| 328 | + | |
327 | 329 | | |
328 | | - | |
329 | 330 | | |
330 | | - | |
| 331 | + | |
331 | 332 | | |
332 | 333 | | |
333 | 334 | | |
| |||
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
912 | 938 | | |
0 commit comments