moq icon indicating copy to clipboard operation
moq copied to clipboard

Minor enhancement to avoid null exceptions.

Open kzu opened this issue 10 months ago • 7 comments

Discussed in https://github.com/devlooped/moq/discussions/1529

Originally posted by iPazooki February 6, 2025 In the AwaitableFactory.cs file, the TryGet method may return null, which is not considered good practice. To address this issue and prevent potential null reference exceptions, I recommend changing the return type to IAwaitableFactory?. This indicates that the return value can be nullable, alerting developers that they need to handle this scenario appropriately. Subsequently, we need to change five more places because of this change which is not a big deal.

Back this issue Back this issue

kzu avatar Feb 18 '25 05:02 kzu

Hi @kzu I'm interested in working on this issue. Can I take it? Also, could you provide any additional details if needed?

ndwpatrick avatar Feb 27 '25 11:02 ndwpatrick

Hi @ndwpatrick. Help is very much appreciated!

kzu avatar Mar 07 '25 21:03 kzu

@kzu Can you please assign this issue to me so that I can start working on it.

ndwpatrick avatar Mar 10 '25 17:03 ndwpatrick

Done!

kzu avatar Mar 10 '25 18:03 kzu

Hi @ndwpatrick , are you working on this issue? Can I maybe take over?

ShirAvneri avatar Apr 25 '25 16:04 ShirAvneri

Hi @kzu , it seems this issue is not being worked on. Could I take over?

ShirAvneri avatar May 10 '25 20:05 ShirAvneri

Sure thing! Assigning to you

kzu avatar May 10 '25 22:05 kzu