lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [50/50] [abbrv] lucenenet git commit: Lucene.Net.Analysis.Common.Util.ResourceLoader refactor: Renamed FindClass() > FindType()
Date Wed, 15 Mar 2017 23:50:32 GMT
Lucene.Net.Analysis.Common.Util.ResourceLoader refactor: Renamed FindClass() > FindType()


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

Branch: refs/heads/api-work
Commit: 467a488cef99bc3becf9297dd13a56fee3fdd87d
Parents: 85b18d2
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Thu Mar 16 06:45:42 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Mar 16 06:45:42 2017 +0700

----------------------------------------------------------------------
 .../Analysis/Synonym/FSTSynonymFilterFactory.cs                  | 4 ++--
 .../Analysis/Synonym/SlowSynonymFilterFactory.cs                 | 2 +-
 .../Analysis/Util/ClasspathResourceLoader.cs                     | 4 ++--
 .../Analysis/Util/FilesystemResourceLoader.cs                    | 4 ++--
 src/Lucene.Net.Analysis.Common/Analysis/Util/ResourceLoader.cs   | 4 +++-
 src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs       | 2 +-
 .../Analysis/Synonym/TestSynonymMap.cs                           | 2 +-
 .../Analysis/Util/StringMockResourceLoader.cs                    | 4 ++--
 8 files changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/467a488c/src/Lucene.Net.Analysis.Common/Analysis/Synonym/FSTSynonymFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/FSTSynonymFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/FSTSynonymFilterFactory.cs
index d24bbe3..725e498 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/FSTSynonymFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/FSTSynonymFilterFactory.cs
@@ -127,7 +127,7 @@ namespace Lucene.Net.Analysis.Synonym
             Encoding decoder = Encoding.UTF8;
 
             SynonymMap.Parser parser;
-            Type clazz = loader.FindClass(cname /*, typeof(SynonymMap.Parser) */);
+            Type clazz = loader.FindType(cname /*, typeof(SynonymMap.Parser) */);
             try
             {
                 parser = (SynonymMap.Parser)Activator.CreateInstance(clazz, new object[]
{ dedup, expand, analyzer });
@@ -155,7 +155,7 @@ namespace Lucene.Net.Analysis.Synonym
         // (there are no tests for this functionality)
         private TokenizerFactory LoadTokenizerFactory(IResourceLoader loader, string cname)
         {
-            Type clazz = loader.FindClass(cname /*, typeof(TokenizerFactory) */);
+            Type clazz = loader.FindType(cname /*, typeof(TokenizerFactory) */);
             try
             {
                 TokenizerFactory tokFactory = (TokenizerFactory)Activator.CreateInstance(clazz,
new object[] { tokArgs });

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/467a488c/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilterFactory.cs
index 6775edd..691b794 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilterFactory.cs
@@ -201,7 +201,7 @@ namespace Lucene.Net.Analysis.Synonym
 
         private TokenizerFactory LoadTokenizerFactory(IResourceLoader loader, string cname)
         {
-            Type clazz = loader.FindClass(cname);
+            Type clazz = loader.FindType(cname);
             try
             {
                 TokenizerFactory tokFactory = (TokenizerFactory)Activator.CreateInstance(clazz,
new object[] { tokArgs });

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/467a488c/src/Lucene.Net.Analysis.Common/Analysis/Util/ClasspathResourceLoader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/ClasspathResourceLoader.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/ClasspathResourceLoader.cs
index 40434f3..19abbd8 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/ClasspathResourceLoader.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/ClasspathResourceLoader.cs
@@ -70,7 +70,7 @@ namespace Lucene.Net.Analysis.Util
             return stream;
         }
 
-        public Type FindClass(string cname)
+        public Type FindType(string cname)
         {
             try
             {
@@ -94,7 +94,7 @@ namespace Lucene.Net.Analysis.Util
 
         public T NewInstance<T>(string cname)
         {
-            Type clazz = FindClass(cname);
+            Type clazz = FindType(cname);
             try
             {
                 return (T)Activator.CreateInstance(clazz);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/467a488c/src/Lucene.Net.Analysis.Common/Analysis/Util/FilesystemResourceLoader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/FilesystemResourceLoader.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/FilesystemResourceLoader.cs
index 275d335..94751f8 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/FilesystemResourceLoader.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/FilesystemResourceLoader.cs
@@ -133,9 +133,9 @@ namespace Lucene.Net.Analysis.Util
             return @delegate.NewInstance<T>(cname);
         }
 
-        public Type FindClass(string cname)
+        public Type FindType(string cname)
         {
-            return @delegate.FindClass(cname);
+            return @delegate.FindType(cname);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/467a488c/src/Lucene.Net.Analysis.Common/Analysis/Util/ResourceLoader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/ResourceLoader.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/ResourceLoader.cs
index 7c472bc..a00bd16 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/ResourceLoader.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/ResourceLoader.cs
@@ -32,8 +32,10 @@ namespace Lucene.Net.Analysis.Util
 
         /// <summary>
         /// Finds class of the name
+        /// <para/>
+        /// NOTE: This was findClass() in Lucene
         /// </summary>
-        Type FindClass(string cname); // LUCENENET TODO: Rename FindType ?
+        Type FindType(string cname);
 
         /// <summary>
         /// Creates an instance of the name and expected type

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/467a488c/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs b/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
index d4612ff..3ea4443 100644
--- a/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
+++ b/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
@@ -1032,7 +1032,7 @@ namespace Lucene.Net.Store
                             startFiles = startSet.ToArray(/*new string[0]*/);
                             endFiles = endSet.ToArray(/*new string[0]*/);
 
-                            if (!Arrays.Equals(startFiles, endFiles)) // LUCENENET TODO:
Possible equals ordinal issue
+                            if (!Arrays.Equals(startFiles, endFiles))
                             {
                                 IList<string> removed = new List<string>();
                                 foreach (string fileName in startFiles)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/467a488c/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMap.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMap.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMap.cs
index a657a33..d339b4e 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMap.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMap.cs
@@ -297,7 +297,7 @@ namespace Lucene.Net.Analysis.Synonym
                 throw new Exception("stub");
             }
 
-            public Type FindClass(string cname)
+            public Type FindType(string cname)
             {
                 throw new Exception("stub");
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/467a488c/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/StringMockResourceLoader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/StringMockResourceLoader.cs
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/StringMockResourceLoader.cs
index 3c828c4..5a597ea 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/StringMockResourceLoader.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/StringMockResourceLoader.cs
@@ -32,7 +32,7 @@ namespace Lucene.Net.Analysis.Util
             this.text = text;
         }
 
-        public Type FindClass(string cname)
+        public Type FindType(string cname)
         {
             try
             {
@@ -46,7 +46,7 @@ namespace Lucene.Net.Analysis.Util
 
         public T NewInstance<T>(string cname)
         {
-            Type clazz = FindClass(cname);
+            Type clazz = FindType(cname);
             try
             {
                 return (T)Activator.CreateInstance(clazz);


Mime
View raw message