From 046370c01ad24dbecdd548a31b6beb23fdf41f7d Mon Sep 17 00:00:00 2001 From: Steve Bohlen Date: Sun, 23 Dec 2012 07:50:27 -0500 Subject: [PATCH] SPRNET-1516 revising behavior inside lock --- src/Spring/Spring.Core/Reflection/Dynamic/DynamicMethod.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Spring/Spring.Core/Reflection/Dynamic/DynamicMethod.cs b/src/Spring/Spring.Core/Reflection/Dynamic/DynamicMethod.cs index 6ae7f637..cb3a32c3 100644 --- a/src/Spring/Spring.Core/Reflection/Dynamic/DynamicMethod.cs +++ b/src/Spring/Spring.Core/Reflection/Dynamic/DynamicMethod.cs @@ -124,9 +124,10 @@ namespace Spring.Reflection.Dynamic lock (stateCache.SyncRoot) { - if (stateCache[methodInfo] == null) + state = (SafeMethodState)stateCache[methodInfo]; + if (state == null) { - state = newState; + state = newState; stateCache[methodInfo] = state; } } @@ -135,7 +136,6 @@ namespace Spring.Reflection.Dynamic this.methodInfo = methodInfo; } - /// /// Invokes dynamic method. ///