Commit cab9b97
fix: CS8604 nullable warning in TodoApp.Avalonia LoggingHandler (#544)
* fix: CS8604 nullable warning in TodoApp.Avalonia LoggingHandler
WriteContentAsync declared a non-nullable HttpContent parameter but both
call sites pass HttpContent? (request.Content / response.Content), which
raised CS8604 in every TodoApp.Avalonia CI build since the samples got
CI coverage. The method already null-checks, so the parameter type just
needed to match actual usage.
* fix: assert instead of skip on null content in LoggingHandler
request.Content and response.Content are never actually null in this
sample app's flow, so the silent skip masked the case rather than
surfacing it. Debug.Assert keeps the CS8604 fix from #544 while making
an unexpected null loud instead of quiet, per review feedback.
---------
Co-authored-by: Adrian Hall <photoadrian@outlook.com>1 parent f8bc030 commit cab9b97
1 file changed
Lines changed: 3 additions & 5 deletions
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 40 | + | |
| 41 | + | |
44 | 42 | | |
45 | 43 | | |
0 commit comments