This is an automated email from the ASF dual-hosted git repository. nightowl888 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit 2cfaf3a6cada976ca114f84d4f58a2cdc9c1eff9 Author: Thomas Mathew <[email protected]> AuthorDate: Thu Jun 6 17:11:42 2019 -0700 Lucene.Net.Support.IO.FileSupport::fileCanonPathCache needs to be threadsafe --- src/Lucene.Net/Support/IO/FileSupport.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Lucene.Net/Support/IO/FileSupport.cs b/src/Lucene.Net/Support/IO/FileSupport.cs index db64b87..55e722a 100644 --- a/src/Lucene.Net/Support/IO/FileSupport.cs +++ b/src/Lucene.Net/Support/IO/FileSupport.cs @@ -1,5 +1,6 @@ using Lucene.Net.Util; using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.Linq; @@ -179,7 +180,7 @@ namespace Lucene.Net.Support.IO return Path.Combine(directory.FullName, string.Concat(prefix, randomFileName)); } - private static readonly IDictionary<string, string> fileCanonPathCache = new Dictionary<string, string>(); + private static readonly IDictionary<string, string> fileCanonPathCache = new ConcurrentDictionary<string, string>(); /// <summary> /// Returns the absolute path of this <see cref="FileSystemInfo"/> with all references resolved and
