Issue 660: revisit changes around ReSharper 2019.1 issues with false null check warnings

issues
Status:open
Assigned To:Brian Pratt
Type:Todo
Area:Skyline
Priority:3
Milestone:4.3
Opened:2019-06-21 09:23 by Brian Pratt
Changed:2022-02-16 15:01 by Brian Pratt
Resolved:
Resolution:
Closed:
2019-06-21 09:23 Brian Pratt
Title»revisit changes around ReSharper 2019.1 issues with false null check warnings
Assigned ToGuest»Brian Pratt
Type»Todo
Area»Skyline
Priority»3
Milestone»19.2
We had to insert several redundant comments like this:

                if (library != null)
                {
                    // (ReSharper 2019.1 seems not to notice the check that's already here)
                    // ReSharper disable PossibleNullReferenceException
                    foreach (var pooledStream in library.ReadStreams)
                    // ReSharper restore PossibleNullReferenceException
                        pooledStream.CloseStream();
                }

we should take them back out again if ReSharper fixes this problem.

Note that this needs to be OK both on Team City and local systems, and it seems that the version on Team City isn't quite the same. For example, this worked locally

                if (library != null)
                {
                    // ReSharper disable once PossibleNullReferenceException (ReSharper 2019.1 seems not to notice the check that's already here)
                    foreach (var pooledStream in library.ReadStreams)
                        pooledStream.CloseStream();
                }

but on TC it seemed to not understand the structured comment with something tacked onto the end.

2022-02-16 15:01 Brian Pratt
Milestone19.2»