lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [42/50] lucenenet git commit: BUG: Lucene.Net.Tests.Index.TestDirectoryReader. Added missing DirectoryNotFoundException catch clauses
Date Thu, 30 Mar 2017 18:00:37 GMT
BUG: Lucene.Net.Tests.Index.TestDirectoryReader. Added missing DirectoryNotFoundException catch
clauses


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

Branch: refs/heads/api-work
Commit: 43a270df3f3d33963326a4b4c5ae2bcb523b6b4c
Parents: 0e2de16
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Thu Mar 30 19:28:10 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Mar 30 19:28:10 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/Index/TestDirectoryReader.cs | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/43a270df/src/Lucene.Net.Tests/Index/TestDirectoryReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestDirectoryReader.cs b/src/Lucene.Net.Tests/Index/TestDirectoryReader.cs
index 73f7bb4..a85e264 100644
--- a/src/Lucene.Net.Tests/Index/TestDirectoryReader.cs
+++ b/src/Lucene.Net.Tests/Index/TestDirectoryReader.cs
@@ -485,6 +485,12 @@ namespace Lucene.Net.Index
             {
                 // expected
             }
+            // LUCENENET specific - since NoSuchDirectoryException subclasses FileNotFoundException
+            // in Lucene, we need to catch it here to be on the safe side.
+            catch (System.IO.DirectoryNotFoundException)
+            {
+                // expected
+            }
 
             dirFile.Delete();
 
@@ -500,6 +506,12 @@ namespace Lucene.Net.Index
             {
                 // expected
             }
+            // LUCENENET specific - since NoSuchDirectoryException subclasses FileNotFoundException
+            // in Lucene, we need to catch it here to be on the safe side.
+            catch (System.IO.DirectoryNotFoundException)
+            {
+                // expected
+            }
 
             dir.Dispose();
         }


Mime
View raw message