From bb1b49cc1c8fc21b7d1d6fac44d59b39dad46950 Mon Sep 17 00:00:00 2001 From: Levi B Date: Tue, 10 Mar 2015 23:40:39 -0700 Subject: [PATCH] Fix PoliCheck violations. --- .../Repositories/EphemeralXmlRepository.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNet.DataProtection/Repositories/EphemeralXmlRepository.cs b/src/Microsoft.AspNet.DataProtection/Repositories/EphemeralXmlRepository.cs index 46e993e979..dcfd8a5b59 100644 --- a/src/Microsoft.AspNet.DataProtection/Repositories/EphemeralXmlRepository.cs +++ b/src/Microsoft.AspNet.DataProtection/Repositories/EphemeralXmlRepository.cs @@ -29,7 +29,7 @@ namespace Microsoft.AspNet.DataProtection.Repositories public virtual IReadOnlyCollection GetAllElements() { - // force complete enumeration under lock to avoid races + // force complete enumeration under lock for thread safety lock (_storedElements) { return GetAllElementsCore().ToList().AsReadOnly(); @@ -49,7 +49,7 @@ namespace Microsoft.AspNet.DataProtection.Repositories { XElement cloned = new XElement(element); // makes a deep copy so caller doesn't inadvertently modify it - // under lock to avoid races + // under lock for thread safety lock (_storedElements) { _storedElements.Add(cloned);