lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [20/20] lucenenet git commit: Lucene.Net.Tests.Store.TestFilterDirectory.TestOverrides(): Fixed test to only scan for non-sealed members (Dispose() is sealed)
Date Sun, 02 Apr 2017 07:06:20 GMT
Lucene.Net.Tests.Store.TestFilterDirectory.TestOverrides(): Fixed test to only scan for non-sealed
members (Dispose() is sealed)


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

Branch: refs/heads/api-work
Commit: ec120c4ba36ef908ed483861d663c9c1cc9f3172
Parents: f57f938
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Apr 2 14:05:30 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Apr 2 14:05:30 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/Store/TestFilterDirectory.cs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ec120c4b/src/Lucene.Net.Tests/Store/TestFilterDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Store/TestFilterDirectory.cs b/src/Lucene.Net.Tests/Store/TestFilterDirectory.cs
index 79d0d54..8172cfd 100644
--- a/src/Lucene.Net.Tests/Store/TestFilterDirectory.cs
+++ b/src/Lucene.Net.Tests/Store/TestFilterDirectory.cs
@@ -42,7 +42,9 @@ namespace Lucene.Net.Store
             exclude.Add(typeof(Directory).GetMethod("OpenChecksumInput", new Type[] { typeof(string),
typeof(IOContext) }).ToString());
             foreach (MethodInfo m in typeof(FilterDirectory).GetMethods())
             {
-                if (m.DeclaringType == typeof(Directory))
+                // LUCNENET specific - Dispose() is final (we have to override the protected
method).
+                // Since it is abstract, no need for a check here - the compiler takes care
of that.
+                if (!m.IsFinal && m.DeclaringType == typeof(Directory))
                 {
                     Assert.IsTrue(exclude.Contains(m.ToString()), "method " + m.Name + "
not overridden!");
                 }


Mime
View raw message