ZLogger icon indicating copy to clipboard operation
ZLogger copied to clipboard

NullReferenceException due to Key being Null in ‎MagicalBox.ReaderCache

Open fitdev opened this issue 1 year ago • 8 comments

When I was debugging the code for issue #157 , I got a lot of NullReferenceExceptions in ‎MagicalBox complaining that dictionary's key is null, apparently nulls get passed to Dictionary lookup routines, where a concrete Type instance is expected for the key.

Since this library intends to be highly performant, throwing such exceptions is not good, and it would be better to avoid such calls by checking in advance if key is null and simply not performing dictionary lookups.

fitdev avatar Apr 15 '24 09:04 fitdev