You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2015/01/16 11:24:58 UTC
lucenenet git commit: handle null DocValuesType appropriately
Repository: lucenenet
Updated Branches:
refs/heads/master 00d3d5f11 -> 3ecdbb107
handle null DocValuesType appropriately
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/3ecdbb10
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/3ecdbb10
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/3ecdbb10
Branch: refs/heads/master
Commit: 3ecdbb1071bf7b5b80aa94b782992bd8f7b44eaa
Parents: 00d3d5f
Author: Laimonas Simutis <la...@gmail.com>
Authored: Thu Jan 15 21:30:58 2015 -0500
Committer: Laimonas Simutis <la...@gmail.com>
Committed: Thu Jan 15 21:30:58 2015 -0500
----------------------------------------------------------------------
.../Codecs/Lucene42/Lucene42FieldInfosReader.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3ecdbb10/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42FieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42FieldInfosReader.cs b/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42FieldInfosReader.cs
index 70ae6f8..69b4f96 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42FieldInfosReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42FieldInfosReader.cs
@@ -92,8 +92,8 @@ namespace Lucene.Net.Codecs.Lucene42
// DV Types are packed in one byte
byte val = input.ReadByte();
- FieldInfo.DocValuesType_e docValuesType = GetDocValuesType(input, (sbyte)(val & 0x0F));
- FieldInfo.DocValuesType_e normsType = GetDocValuesType(input, (sbyte)(((int)((uint)val >> 4)) & 0x0F));
+ FieldInfo.DocValuesType_e? docValuesType = GetDocValuesType(input, (sbyte)(val & 0x0F));
+ FieldInfo.DocValuesType_e? normsType = GetDocValuesType(input, (sbyte)(((int)((uint)val >> 4)) & 0x0F));
IDictionary<string, string> attributes = input.ReadStringStringMap();
infos[i] = new FieldInfo(name, isIndexed, fieldNumber, storeTermVector, omitNorms, storePayloads, indexOptions, docValuesType, normsType, CollectionsHelper.UnmodifiableMap(attributes));
}
@@ -116,11 +116,11 @@ namespace Lucene.Net.Codecs.Lucene42
}
}
- private static FieldInfo.DocValuesType_e GetDocValuesType(IndexInput input, sbyte b)
+ private static FieldInfo.DocValuesType_e? GetDocValuesType(IndexInput input, sbyte b)
{
if (b == 0)
{
- return default(FieldInfo.DocValuesType_e);
+ return null;
}
else if (b == 1)
{