lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [3/5] lucenenet git commit: Lucene.Net.Codecs: Added ExceptionToNullableEnumConvention attribute to members where it is not possible to eliminate nullables
Date Sat, 11 Mar 2017 06:03:58 GMT
Lucene.Net.Codecs: Added ExceptionToNullableEnumConvention attribute to members where it is
not possible to eliminate nullables


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

Branch: refs/heads/api-work
Commit: a7edd89f823f48d6c8134fc99c7e2e043b26e56b
Parents: 7c938be
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Mar 10 23:11:06 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Mar 11 13:03:32 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs | 6 ++++--
 src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs     | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a7edd89f/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
index e173c24..1d8fe3e 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
@@ -1,4 +1,5 @@
-using System;
+using Lucene.Net.Support;
+using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Diagnostics;
@@ -157,9 +158,10 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
+        [ExceptionToNullableEnumConvention]
         public virtual Index.DocValuesType? DocValuesType(string dvType)
         {
-            return "false".Equals(dvType) ? null : (Index.DocValuesType?)Enum.Parse(typeof(Index.DocValuesType),
dvType);
+            return "false".Equals(dvType) ? null : (Index.DocValuesType?)Enum.Parse(typeof(Index.DocValuesType),
dvType, true);
         }
 
         private string ReadString(int offset, BytesRef scratch)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a7edd89f/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
index 11516ee..ab64fca 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Index;
+using Lucene.Net.Support;
 using Lucene.Net.Util.Fst;
 using System;
 using System.Collections.Generic;
@@ -115,6 +116,7 @@ namespace Lucene.Net.Codecs.SimpleText
             
             private readonly BytesRefFSTEnum<PairOutputs<long?, PairOutputs<long?,long?>.Pair>.Pair>
_fstEnum;
 
+            [ExceptionToNullableEnumConvention]
             public SimpleTextTermsEnum(SimpleTextFieldsReader outerInstance,
                 FST<PairOutputs<long?, PairOutputs<long?,long?>.Pair>.Pair>
fst, IndexOptions? indexOptions)
             {


Mime
View raw message