lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [30/50] [abbrv] lucenenet git commit: Lucene.Net.TestFramework.Util.LuceneTestCase: Added missing catch block for UnauthorizedAccessException, which does not subclass IOException in .NET as was the case in Java.
Date Sat, 09 Sep 2017 00:31:48 GMT
Lucene.Net.TestFramework.Util.LuceneTestCase: Added missing catch block for UnauthorizedAccessException,
which does not subclass IOException in .NET as was the case in Java.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/8bd32778
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/8bd32778
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/8bd32778

Branch: refs/heads/master
Commit: 8bd32778e18205c428e1c6cbd7cc8fd5b41885bf
Parents: ea9e380
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Sep 8 20:47:18 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri Sep 8 20:47:18 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8bd32778/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
index af63825..e03435d 100644
--- a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
@@ -2859,6 +2859,17 @@ namespace Lucene.Net.Util
                         else if (System.IO.File.Exists(f))
                             File.Delete(f);
                     }
+                    // LUCENENET specific: UnauthorizedAccessException doesn't subclass IOException
as
+                    // AccessDeniedException does in Java, so we need a special case for
it.
+                    catch (UnauthorizedAccessException e)
+                    {
+                        //                    Type suiteClass = RandomizedContext.Current.GetTargetType;
+                        //                    if (suiteClass.IsAnnotationPresent(typeof(SuppressTempFileChecks)))
+                        //                    {
+                        Console.Error.WriteLine("WARNING: Leftover undeleted temporary files
" + e.Message);
+                        return;
+                        //                    }
+                    }
                     catch (IOException e)
                     {
                         //                    Type suiteClass = RandomizedContext.Current.GetTargetType;


Mime
View raw message