Closed TheTyrant25 closed 2 months ago
Using !
is generally something to avoid since it's suppressing an actual potential issue. It's better to instead do things differently to ensure the value could never be null, or check if the value is null and handle it accordingly.
oh huh it's failing ubuntu-latest build test and release
By adding
!
and?
at strategic locations, as well as some other changes, the warnings about dereferencing/referencing of null/nullable types are removed. in (presumably) all the cases where the warning exists there are already circumstances that make it so that the errors being warned against can't happen anyway, so these shouldn't hurt. fingers crossed.The file has gone from having 39 warnings to only 14.
Some of the warnings that are more legitimate in origin have been left in.