lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject lucenenet git commit: pass parameter types to avoid ambigious match exception
Date Fri, 06 Feb 2015 13:24:48 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 31422d484 -> 645497ae0


pass parameter types to avoid ambigious match exception


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

Branch: refs/heads/master
Commit: 645497ae05c7676aa910e7a472fa7b771d1b45d8
Parents: 31422d4
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Fri Feb 6 08:05:29 2015 -0500
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Fri Feb 6 08:05:29 2015 -0500

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Index/TestFilterAtomicReader.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/645497ae/src/Lucene.Net.Tests/core/Index/TestFilterAtomicReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestFilterAtomicReader.cs b/src/Lucene.Net.Tests/core/Index/TestFilterAtomicReader.cs
index f4c128a..16de01b 100644
--- a/src/Lucene.Net.Tests/core/Index/TestFilterAtomicReader.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestFilterAtomicReader.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Linq;
 using System.Reflection;
 using Lucene.Net.Documents;
 
@@ -185,7 +186,6 @@ namespace Lucene.Net.Index
             target.Dispose();
         }
 
-        //LUCENENET TODO: What is synthetic checking? is that what breaks the MethodInfo
subM line?
         private static void CheckOverrideMethods(Type clazz)
         {
             Type superClazz = clazz.BaseType;
@@ -200,7 +200,7 @@ namespace Lucene.Net.Index
                 // methods to override to have a working impl minimal and prevents from some
                 // traps: for example, think about having getCoreCacheKey delegate to the
                 // filtered impl by default
-                MethodInfo subM = clazz.GetMethod(m.Name/*, m.PropertyTypes*/);
+                MethodInfo subM = clazz.GetMethod(m.Name, m.GetParameters().Select(p =>
p.ParameterType).ToArray());
                 if (subM.DeclaringType == clazz && m.DeclaringType != typeof(object)
&& m.DeclaringType != subM.DeclaringType)
                 {
                     Assert.Fail(clazz + " overrides " + m + " although it has a default impl");


Mime
View raw message