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/25 13:28:18 UTC
[2/3] lucenenet git commit: We should be treating this value as an
sbyte
We should be treating this value as an sbyte
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/d0ec50f7
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/d0ec50f7
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/d0ec50f7
Branch: refs/heads/master
Commit: d0ec50f736ee1bf91e9be10a61ac9b7d9ed07adb
Parents: a6aa4e2
Author: Itamar Syn-Hershko <it...@code972.com>
Authored: Sun Jan 25 14:27:25 2015 +0200
Committer: Itamar Syn-Hershko <it...@code972.com>
Committed: Sun Jan 25 14:27:25 2015 +0200
----------------------------------------------------------------------
.../Codecs/lucene3x/PreFlexRWNormsConsumer.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d0ec50f7/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWNormsConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWNormsConsumer.cs b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWNormsConsumer.cs
index cf9153a..2a91121 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWNormsConsumer.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWNormsConsumer.cs
@@ -81,11 +81,11 @@ namespace Lucene.Net.Codecs.Lucene3x
public override void AddNumericField(FieldInfo field, IEnumerable<long?> values)
{
Debug.Assert(field.Number > LastFieldNumber, "writing norms fields out of order" + LastFieldNumber + " -> " + field.Number);
- foreach (long? n in values)
+ foreach (var n in values)
{
- if ((long)n < sbyte.MinValue || (long)n > sbyte.MaxValue)
+ if (((sbyte)(byte)(long)n) < sbyte.MinValue || ((sbyte)(byte)(long)n) > sbyte.MaxValue)
{
- throw new System.NotSupportedException("3.x cannot index norms that won't fit in a byte, got: " + (long)n);
+ throw new System.NotSupportedException("3.x cannot index norms that won't fit in a byte, got: " + ((sbyte)(byte)(long)n));
}
@out.WriteByte((byte)(sbyte)n);
}