Skip to content

Commit 502b254

Browse files
committed
Avoids a possible NullReferenceException when checking for the existence of a key in a non-thread-safe dictionary
1 parent 09feaea commit 502b254

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

QueryBuilder/Compilers/ConditionsCompilerProvider.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ public MethodInfo GetMethodInfo(Type clauseType, string methodName)
2121
// The cache key should take the type and the method name into consideration
2222
var cacheKey = methodName + "::" + clauseType.FullName;
2323

24-
if (methodsCache.ContainsKey(cacheKey))
25-
{
26-
return methodsCache[cacheKey];
27-
}
28-
2924
lock (syncRoot)
3025
{
3126
if (methodsCache.ContainsKey(cacheKey))

0 commit comments

Comments
 (0)