lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [3/5] lucenenet git commit: Getting rid of most sbyte usage in public API
Date Mon, 10 Nov 2014 15:25:25 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Search/Spans/SpanNotQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/SpanNotQuery.cs b/src/Lucene.Net.Core/Search/Spans/SpanNotQuery.cs
index dc2e31c..05c042a 100644
--- a/src/Lucene.Net.Core/Search/Spans/SpanNotQuery.cs
+++ b/src/Lucene.Net.Core/Search/Spans/SpanNotQuery.cs
@@ -240,14 +240,14 @@ namespace Lucene.Net.Search.Spans
                 return includeSpans.End();
             }
 
-            public override ICollection<sbyte[]> Payload
+            public override ICollection<byte[]> Payload
             {
                 get
                 {
-                    List<sbyte[]> result = null;
+                    List<byte[]> result = null;
                     if (includeSpans.PayloadAvailable)
                     {
-                        result = new List<sbyte[]>(includeSpans.Payload);
+                        result = new List<byte[]>(includeSpans.Payload);
                     }
                     return result;
                 }
@@ -277,13 +277,13 @@ namespace Lucene.Net.Search.Spans
         {
             SpanNotQuery clone = null;
 
-            SpanQuery rewrittenInclude = (SpanQuery)include.Rewrite(reader);
+            var rewrittenInclude = (SpanQuery)include.Rewrite(reader);
             if (rewrittenInclude != include)
             {
                 clone = (SpanNotQuery)this.Clone();
                 clone.include = rewrittenInclude;
             }
-            SpanQuery rewrittenExclude = (SpanQuery)exclude.Rewrite(reader);
+            var rewrittenExclude = (SpanQuery)exclude.Rewrite(reader);
             if (rewrittenExclude != exclude)
             {
                 if (clone == null)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs b/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs
index 8db67a1..dec18e1 100644
--- a/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs
+++ b/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs
@@ -326,15 +326,15 @@ namespace Lucene.Net.Search.Spans
                 return Top().End();
             }
 
-            public override ICollection<sbyte[]> Payload
+            public override ICollection<byte[]> Payload
             {
                 get
                 {
-                    List<sbyte[]> result = null;
+                    List<byte[]> result = null;
                     Spans theTop = Top();
                     if (theTop != null && theTop.PayloadAvailable)
                     {
-                        result = new List<sbyte[]>(theTop.Payload);
+                        result = new List<byte[]>(theTop.Payload);
                     }
                     return result;
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Search/Spans/SpanPayloadCheckQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/SpanPayloadCheckQuery.cs b/src/Lucene.Net.Core/Search/Spans/SpanPayloadCheckQuery.cs
index fab8344..86be021 100644
--- a/src/Lucene.Net.Core/Search/Spans/SpanPayloadCheckQuery.cs
+++ b/src/Lucene.Net.Core/Search/Spans/SpanPayloadCheckQuery.cs
@@ -36,12 +36,12 @@ namespace Lucene.Net.Search.Spans
     /// </summary>
     public class SpanPayloadCheckQuery : SpanPositionCheckQuery
     {
-        protected internal readonly ICollection<sbyte[]> PayloadToMatch;
+        protected internal readonly ICollection<byte[]> PayloadToMatch;
 
         ///
         /// <param name="match"> The underlying <seealso cref="Lucene.Net.Search.Spans.SpanQuery"/> to check </param>
         /// <param name="payloadToMatch"> The <seealso cref="java.util.Collection"/> of payloads to match </param>
-        public SpanPayloadCheckQuery(SpanQuery match, ICollection<sbyte[]> payloadToMatch)
+        public SpanPayloadCheckQuery(SpanQuery match, ICollection<byte[]> payloadToMatch)
             : base(match)
         {
             if (match is SpanNearQuery)
@@ -56,14 +56,14 @@ namespace Lucene.Net.Search.Spans
             bool result = spans.PayloadAvailable;
             if (result == true)
             {
-                ICollection<sbyte[]> candidate = spans.Payload;
+                var candidate = spans.Payload;
                 if (candidate.Count == PayloadToMatch.Count)
                 {
                     //TODO: check the byte arrays are the same
-                    IEnumerator<sbyte[]> toMatchIter = PayloadToMatch.GetEnumerator();
+                    var toMatchIter = PayloadToMatch.GetEnumerator();
                     //check each of the byte arrays, in order
                     //hmm, can't rely on order here
-                    foreach (sbyte[] candBytes in candidate)
+                    foreach (var candBytes in candidate)
                     {
                         toMatchIter.MoveNext();
                         //if one is a mismatch, then return false
@@ -89,7 +89,7 @@ namespace Lucene.Net.Search.Spans
             buffer.Append("spanPayCheck(");
             buffer.Append(match.ToString(field));
             buffer.Append(", payloadRef: ");
-            foreach (sbyte[] bytes in PayloadToMatch)
+            foreach (var bytes in PayloadToMatch)
             {
                 ToStringUtils.ByteArray(buffer, bytes);
                 buffer.Append(';');

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Search/Spans/SpanPositionCheckQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/SpanPositionCheckQuery.cs b/src/Lucene.Net.Core/Search/Spans/SpanPositionCheckQuery.cs
index 723bf06..bd0e472 100644
--- a/src/Lucene.Net.Core/Search/Spans/SpanPositionCheckQuery.cs
+++ b/src/Lucene.Net.Core/Search/Spans/SpanPositionCheckQuery.cs
@@ -107,7 +107,7 @@ namespace Lucene.Net.Search.Spans
         {
             SpanPositionCheckQuery clone = null;
 
-            SpanQuery rewritten = (SpanQuery)match.Rewrite(reader);
+            var rewritten = (SpanQuery)match.Rewrite(reader);
             if (rewritten != match)
             {
                 clone = (SpanPositionCheckQuery)this.Clone();
@@ -198,14 +198,14 @@ namespace Lucene.Net.Search.Spans
                 return Spans.End();
             }
 
-            public override ICollection<sbyte[]> Payload
+            public override ICollection<byte[]> Payload
             {
                 get
                 {
-                    List<sbyte[]> result = null;
+                    List<byte[]> result = null;
                     if (Spans.PayloadAvailable)
                     {
-                        result = new List<sbyte[]>(Spans.Payload);
+                        result = new List<byte[]>(Spans.Payload);
                     }
                     return result; //TODO: any way to avoid the new construction?
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Search/Spans/Spans.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/Spans.cs b/src/Lucene.Net.Core/Search/Spans/Spans.cs
index d187ba8..e84a276 100644
--- a/src/Lucene.Net.Core/Search/Spans/Spans.cs
+++ b/src/Lucene.Net.Core/Search/Spans/Spans.cs
@@ -1,4 +1,5 @@
 using System.Collections.Generic;
+using System.IO;
 
 namespace Lucene.Net.Search.Spans
 {
@@ -82,7 +83,7 @@ namespace Lucene.Net.Search.Spans
         /// <returns> a List of byte arrays containing the data of this payload, otherwise null if isPayloadAvailable is false </returns>
         /// <exception cref="IOException"> if there is a low-level I/O error </exception>
         // TODO: Remove warning after API has been finalized
-        public abstract ICollection<sbyte[]> Payload { get; }
+        public abstract ICollection<byte[]> Payload { get; }
 
         /// <summary>
         /// Checks if a payload can be loaded at this position.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Search/Spans/TermSpans.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/TermSpans.cs b/src/Lucene.Net.Core/Search/Spans/TermSpans.cs
index 8a339c8..1489824 100644
--- a/src/Lucene.Net.Core/Search/Spans/TermSpans.cs
+++ b/src/Lucene.Net.Core/Search/Spans/TermSpans.cs
@@ -113,16 +113,16 @@ namespace Lucene.Net.Search.Spans
         }
 
         // TODO: Remove warning after API has been finalized
-        public override ICollection<sbyte[]> Payload
+        public override ICollection<byte[]> Payload
         {
             get
             {
-                BytesRef payload = Postings_Renamed.Payload;
+                var payload = Postings_Renamed.Payload;
                 ReadPayload = true;
-                sbyte[] bytes;
+                byte[] bytes;
                 if (payload != null)
                 {
-                    bytes = new sbyte[payload.Length];
+                    bytes = new byte[payload.Length];
                     Array.Copy(payload.Bytes, payload.Offset, bytes, 0, payload.Length);
                 }
                 else
@@ -184,7 +184,7 @@ namespace Lucene.Net.Search.Spans
                 return -1;
             }
 
-            public override ICollection<sbyte[]> Payload
+            public override ICollection<byte[]> Payload
             {
                 get
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Store/DataOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/DataOutput.cs b/src/Lucene.Net.Core/Store/DataOutput.cs
index 04ee1b8..63edc09 100644
--- a/src/Lucene.Net.Core/Store/DataOutput.cs
+++ b/src/Lucene.Net.Core/Store/DataOutput.cs
@@ -255,13 +255,18 @@ namespace Lucene.Net.Store
         /// <seealso cref= DataInput#readString() </seealso>
         public virtual void WriteString(string s)
         {
-            BytesRef utf8Result = new BytesRef(10);
+            var utf8Result = new BytesRef(10);
             UnicodeUtil.UTF16toUTF8(s.ToCharArray(), 0, s.Length, utf8Result);
             WriteVInt(utf8Result.Length);
             WriteBytes(utf8Result.Bytes, 0, utf8Result.Length);
         }
 
-        private static int COPY_BUFFER_SIZE = 16384;
+        public void Write(byte[] b, int off, int len)
+        {
+            WriteBytes(b, off, len);
+        }
+
+        private const int COPY_BUFFER_SIZE = 16384;
         private sbyte[] CopyBuffer;
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Store/FSDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/FSDirectory.cs b/src/Lucene.Net.Core/Store/FSDirectory.cs
index 1c80319..aaa278f 100644
--- a/src/Lucene.Net.Core/Store/FSDirectory.cs
+++ b/src/Lucene.Net.Core/Store/FSDirectory.cs
@@ -125,7 +125,7 @@ namespace Lucene.Net.Store
             {
                 file.Create();
             }
-            catch (IOException ioe)
+            catch (IOException)
             {
                 //File already exists
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs b/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs
index 743184e..e21210a 100644
--- a/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs
+++ b/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs
@@ -443,7 +443,7 @@ namespace Lucene.Net.Store
                         }
                         return !obtained;
                     }
-                    catch (System.IO.IOException ioe)
+                    catch (IOException)
                     {
                         return false;
                     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Store/RAMOutputStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/RAMOutputStream.cs b/src/Lucene.Net.Core/Store/RAMOutputStream.cs
index 4e3183b..09f1a1a 100644
--- a/src/Lucene.Net.Core/Store/RAMOutputStream.cs
+++ b/src/Lucene.Net.Core/Store/RAMOutputStream.cs
@@ -82,7 +82,7 @@ namespace Lucene.Net.Store
         /// Copy the current contents of this buffer to output
         ///  byte array
         /// </summary>
-        public virtual void WriteTo(sbyte[] bytes, int offset)
+        public virtual void WriteTo(byte[] bytes, int offset)
         {
             Flush();
             long end = File.Length_Renamed;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Support/StringSupport.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/StringSupport.cs b/src/Lucene.Net.Core/Support/StringSupport.cs
index b7dc25a..94f9108 100644
--- a/src/Lucene.Net.Core/Support/StringSupport.cs
+++ b/src/Lucene.Net.Core/Support/StringSupport.cs
@@ -1,14 +1,13 @@
 ´╗┐using Lucene.Net.Util;
-using System;
 using System.Text;
 
 namespace Lucene.Net.Support
 {
     public static class StringSupport
     {
-        public static sbyte[] GetBytes(this string str, Encoding enc)
+        public static byte[] GetBytes(this string str, Encoding enc)
         {
-            return (sbyte[])(Array)enc.GetBytes(str);
+            return enc.GetBytes(str);
         }
 
         public static BytesRef ToBytesRefArray(this string str, Encoding enc)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/ArrayUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/ArrayUtil.cs b/src/Lucene.Net.Core/Util/ArrayUtil.cs
index 22e4603..031169a 100644
--- a/src/Lucene.Net.Core/Util/ArrayUtil.cs
+++ b/src/Lucene.Net.Core/Util/ArrayUtil.cs
@@ -445,23 +445,18 @@ namespace Lucene.Net.Util
             }
         }
 
-        public static sbyte[] Grow(sbyte[] array)
-        {
-            return Grow(array, 1 + array.Length);
-        }
-
         public static byte[] Grow(byte[] array)
         {
             return Grow(array, 1 + array.Length);
         }
 
-        public static sbyte[] Shrink(sbyte[] array, int targetSize)
+        public static byte[] Shrink(byte[] array, int targetSize)
         {
             Debug.Assert(targetSize >= 0, "size must be positive (got " + targetSize + "): likely integer overflow?");
             int newSize = GetShrinkSize(array.Length, targetSize, 1);
             if (newSize != array.Length)
             {
-                sbyte[] newArray = new sbyte[newSize];
+                var newArray = new byte[newSize];
                 Array.Copy(array, 0, newArray, 0, newSize);
                 return newArray;
             }
@@ -548,7 +543,7 @@ namespace Lucene.Net.Util
             Debug.Assert(minSize >= 0, "size must be positive (got " + minSize + "): likely integer overflow?");
             if (array.Length < minSize)
             {
-                int[][] newArray = new int[Oversize(minSize, RamUsageEstimator.NUM_BYTES_OBJECT_REF)][];
+                var newArray = new int[Oversize(minSize, RamUsageEstimator.NUM_BYTES_OBJECT_REF)][];
                 Array.Copy(array, 0, newArray, 0, array.Length);
                 return newArray;
             }
@@ -683,7 +678,7 @@ namespace Lucene.Net.Util
         /// <returns> true if the two arrays, starting at their respective offsets, are equal
         /// </returns>
         /// <seealso cref= java.util.Arrays#equals(byte[], byte[]) </seealso>
-        public static bool Equals(sbyte[] left, int offsetLeft, sbyte[] right, int offsetRight, int length)
+        public static bool Equals(byte[] left, int offsetLeft, byte[] right, int offsetRight, int length)
         {
             if ((offsetLeft + length <= left.Length) && (offsetRight + length <= right.Length))
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Automaton/ByteRunAutomaton.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Automaton/ByteRunAutomaton.cs b/src/Lucene.Net.Core/Util/Automaton/ByteRunAutomaton.cs
index 96c7e9a..0eddb45 100644
--- a/src/Lucene.Net.Core/Util/Automaton/ByteRunAutomaton.cs
+++ b/src/Lucene.Net.Core/Util/Automaton/ByteRunAutomaton.cs
@@ -37,13 +37,13 @@ namespace Lucene.Net.Util.Automaton
         /// <summary>
         /// Returns true if the given byte array is accepted by this automaton
         /// </summary>
-        public virtual bool Run(sbyte[] s, int offset, int length)
+        public virtual bool Run(byte[] s, int offset, int length)
         {
-            int p = Initial;
-            int l = offset + length;
+            var p = Initial;
+            var l = offset + length;
             for (int i = offset; i < l; i++)
             {
-                p = Step(p, s[i] & 0xFF);
+                p = Step(p, ((sbyte)s[i]) & 0xFF);
                 if (p == -1)
                 {
                     return false;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Automaton/CompiledAutomaton.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Automaton/CompiledAutomaton.cs b/src/Lucene.Net.Core/Util/Automaton/CompiledAutomaton.cs
index 7eef428..ed51849 100644
--- a/src/Lucene.Net.Core/Util/Automaton/CompiledAutomaton.cs
+++ b/src/Lucene.Net.Core/Util/Automaton/CompiledAutomaton.cs
@@ -239,7 +239,7 @@ namespace Lucene.Net.Util.Automaton
                 term.Grow(1 + idx);
             }
             //if (DEBUG) System.out.println("  add floorLabel=" + (char) floorLabel + " idx=" + idx);
-            term.Bytes[idx] = (sbyte)floorLabel;
+            term.Bytes[idx] = (byte)floorLabel;
 
             state = maxTransition.To.Number;
             idx++;
@@ -266,7 +266,7 @@ namespace Lucene.Net.Util.Automaton
                         term.Grow(1 + idx);
                     }
                     //if (DEBUG) System.out.println("  push maxLabel=" + (char) lastTransition.max + " idx=" + idx);
-                    term.Bytes[idx] = (sbyte)lastTransition.Max_Renamed;
+                    term.Bytes[idx] = (byte)lastTransition.Max_Renamed;
                     state = lastTransition.To.Number;
                     idx++;
                 }
@@ -338,7 +338,7 @@ namespace Lucene.Net.Util.Automaton
             int idx = 0;
             while (true)
             {
-                int label = input.Bytes[input.Offset + idx] & 0xff;
+                int label = ((sbyte)input.Bytes[input.Offset + idx]) & 0xff;
                 int nextState = RunAutomaton.Step(state, label);
                 //if (DEBUG) System.out.println("  cycle label=" + (char) label + " nextState=" + nextState);
 
@@ -351,7 +351,7 @@ namespace Lucene.Net.Util.Automaton
                         {
                             output.Grow(1 + idx);
                         }
-                        output.Bytes[idx] = (sbyte)label;
+                        output.Bytes[idx] = (byte)label;
                         output.Length = input.Length;
                         //if (DEBUG) System.out.println("  input is accepted; return term=" + output.utf8ToString());
                         return output;
@@ -416,7 +416,7 @@ namespace Lucene.Net.Util.Automaton
                     {
                         output.Grow(1 + idx);
                     }
-                    output.Bytes[idx] = (sbyte)label;
+                    output.Bytes[idx] = (byte)label;
                     stack.Add(state);
                     state = nextState;
                     idx++;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs b/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs
index f634ab7..75c8f86 100644
--- a/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs
+++ b/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs
@@ -170,7 +170,7 @@ namespace Lucene.Net.Util.Automaton
                     if (t.Min_Renamed == t.Max_Renamed && !visited.Contains(t.To))
                     {
                         @ref.Grow(++@ref.Length);
-                        @ref.Bytes[@ref.Length - 1] = (sbyte)t.Min_Renamed;
+                        @ref.Bytes[@ref.Length - 1] = (byte)t.Min_Renamed;
                         s = t.To;
                         done = false;
                     }
@@ -223,7 +223,7 @@ namespace Lucene.Net.Util.Automaton
             int num = @ref.Length >> 1;
             for (int i = @ref.Offset; i < (@ref.Offset + num); i++)
             {
-                sbyte b = @ref.Bytes[i];
+                var b = @ref.Bytes[i];
                 @ref.Bytes[i] = @ref.Bytes[@ref.Offset * 2 + @ref.Length - i - 1];
                 @ref.Bytes[@ref.Offset * 2 + @ref.Length - i - 1] = b;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/BitUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/BitUtil.cs b/src/Lucene.Net.Core/Util/BitUtil.cs
index ef40adc..48cee94 100644
--- a/src/Lucene.Net.Core/Util/BitUtil.cs
+++ b/src/Lucene.Net.Core/Util/BitUtil.cs
@@ -60,11 +60,6 @@ namespace Lucene.Net.Util // from org.apache.solr.util rev 555343
             return BYTE_COUNTS[b & 0xFF];
         }
 
-        public static int BitCount(sbyte b)
-        {
-            return BYTE_COUNTS[b & 0xFF];
-        }
-
         /// <summary>
         /// Return the list of bits which are set in b encoded as followed:
         /// <code>(i >>> (4 * n)) & 0x0F</code> is the offset of the n-th set bit of
@@ -75,14 +70,9 @@ namespace Lucene.Net.Util // from org.apache.solr.util rev 555343
         /// <li><code>(0x43 >>> 8) & 0x0F</code> is 0, meaning there is no more bit set in this byte.</li>
         /// </ul>
         /// </summary>
-        public static int BitList(sbyte b)
-        {
-            return BIT_LISTS[b & 0xFF];
-        }
-
         public static int BitList(byte b)
         {
-            return BitList((sbyte)b);
+            return BIT_LISTS[b & 0xFF];
         }
 
         // The pop methods used to rely on bit-manipulation tricks for speed but it

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/ByteBlockPool.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/ByteBlockPool.cs b/src/Lucene.Net.Core/Util/ByteBlockPool.cs
index e7e1d9d..2b2680f 100644
--- a/src/Lucene.Net.Core/Util/ByteBlockPool.cs
+++ b/src/Lucene.Net.Core/Util/ByteBlockPool.cs
@@ -61,19 +61,19 @@ namespace Lucene.Net.Util
                 this.BlockSize = blockSize;
             }
 
-            public abstract void RecycleByteBlocks(sbyte[][] blocks, int start, int end);
+            public abstract void RecycleByteBlocks(byte[][] blocks, int start, int end);
 
-            public virtual void RecycleByteBlocks(List<sbyte[]> blocks)
+            public virtual void RecycleByteBlocks(List<byte[]> blocks)
             {
                 var b = blocks.ToArray();
                 RecycleByteBlocks(b, 0, b.Length);
             }
 
-            public virtual sbyte[] ByteBlock
+            public virtual byte[] ByteBlock
             {
                 get
                 {
-                    return new sbyte[BlockSize];
+                    return new byte[BlockSize];
                 }
             }
         }
@@ -92,7 +92,7 @@ namespace Lucene.Net.Util
             {
             }
 
-            public override void RecycleByteBlocks(sbyte[][] blocks, int start, int end)
+            public override void RecycleByteBlocks(byte[][] blocks, int start, int end)
             {
             }
         }
@@ -116,16 +116,16 @@ namespace Lucene.Net.Util
                 this.BytesUsed = bytesUsed;
             }
 
-            public override sbyte[] ByteBlock
+            public override byte[] ByteBlock
             {
                 get
                 {
                     BytesUsed.AddAndGet(BlockSize);
-                    return new sbyte[BlockSize];
+                    return new byte[BlockSize];
                 }
             }
 
-            public override void RecycleByteBlocks(sbyte[][] blocks, int start, int end)
+            public override void RecycleByteBlocks(byte[][] blocks, int start, int end)
             {
                 BytesUsed.AddAndGet(-((end - start) * BlockSize));
                 for (var i = start; i < end; i++)
@@ -139,7 +139,7 @@ namespace Lucene.Net.Util
         /// array of buffers currently used in the pool. Buffers are allocated if
         /// needed don't modify this outside of this class.
         /// </summary>
-        public sbyte[][] Buffers = new sbyte[10][];
+        public byte[][] Buffers = new byte[10][];
 
         /// <summary>
         /// index into the buffers array pointing to the current buffer used as the head </summary>
@@ -152,7 +152,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Current head buffer
         /// </summary>
-        public sbyte[] Buffer;
+        public byte[] Buffer;
 
         /// <summary>
         /// Current head offset </summary>
@@ -196,11 +196,11 @@ namespace Lucene.Net.Util
                     {
                         // Fully zero fill buffers that we fully used
                         //Array.Clear(Buffers[i], 0, Buffers[i].Length);
-                        Arrays.Fill(Buffers[i], (sbyte)0);
+                        Arrays.Fill(Buffers[i], (byte)0);
                     }
                     // Partial zero fill the final buffer
                     //Array.Clear(Buffers[BufferUpto], 0, BufferUpto);
-                    Arrays.Fill(Buffers[BufferUpto], 0, ByteUpto, (sbyte)0);
+                    Arrays.Fill(Buffers[BufferUpto], 0, ByteUpto, (byte)0);
                 }
 
                 if (BufferUpto > 0 || !reuseFirst)
@@ -239,7 +239,7 @@ namespace Lucene.Net.Util
         {
             if (1 + BufferUpto == Buffers.Length)
             {
-                var newBuffers = new sbyte[ArrayUtil.Oversize(Buffers.Length + 1, RamUsageEstimator.NUM_BYTES_OBJECT_REF)][];
+                var newBuffers = new byte[ArrayUtil.Oversize(Buffers.Length + 1, RamUsageEstimator.NUM_BYTES_OBJECT_REF)][];
                 Array.Copy(Buffers, 0, newBuffers, 0, Buffers.Length);
                 Buffers = newBuffers;
             }
@@ -291,7 +291,7 @@ namespace Lucene.Net.Util
         /// Creates a new byte slice with the given starting size and
         /// returns the slices offset in the pool.
         /// </summary>
-        public int AllocSlice(sbyte[] slice, int upto)
+        public int AllocSlice(byte[] slice, int upto)
         {
             int level = slice[upto] & 15;
             int newLevel = NEXT_LEVEL_ARRAY[level];
@@ -314,13 +314,13 @@ namespace Lucene.Net.Util
             Buffer[newUpto + 2] = slice[upto - 1];
 
             // Write forwarding address at end of last slice:
-            slice[upto - 3] = (sbyte)Number.URShift(offset, 24);
-            slice[upto - 2] = (sbyte)Number.URShift(offset, 16);
-            slice[upto - 1] = (sbyte)Number.URShift(offset, 8);
-            slice[upto] = (sbyte)offset;
+            slice[upto - 3] = (byte)Number.URShift(offset, 24);
+            slice[upto - 2] = (byte)Number.URShift(offset, 16);
+            slice[upto - 1] = (byte)Number.URShift(offset, 8);
+            slice[upto] = (byte)offset;
 
             // Write new level:
-            Buffer[ByteUpto - 1] = (sbyte)(16 | newLevel);
+            Buffer[ByteUpto - 1] = (byte)(16 | newLevel);
 
             return newUpto + 3;
         }
@@ -387,18 +387,18 @@ namespace Lucene.Net.Util
         /// length into the given byte array at offset <tt>off</tt>.
         /// <p>Note: this method allows to copy across block boundaries.</p>
         /// </summary>
-        public void ReadBytes(long offset, sbyte[] bytes, int off, int length)
+        public void ReadBytes(long offset, byte[] bytes, int off, int length)
         {
             if (length == 0)
             {
                 return;
             }
-            int bytesOffset = off;
-            int bytesLength = length;
-            int bufferIndex = (int)(offset >> BYTE_BLOCK_SHIFT);
-            sbyte[] buffer = Buffers[bufferIndex];
-            int pos = (int)(offset & BYTE_BLOCK_MASK);
-            int overflow = (pos + length) - BYTE_BLOCK_SIZE;
+            var bytesOffset = off;
+            var bytesLength = length;
+            var bufferIndex = (int)(offset >> BYTE_BLOCK_SHIFT);
+            var buffer = Buffers[bufferIndex];
+            var pos = (int)(offset & BYTE_BLOCK_MASK);
+            var overflow = (pos + length) - BYTE_BLOCK_SIZE;
             do
             {
                 if (overflow <= 0)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/BytesRef.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/BytesRef.cs b/src/Lucene.Net.Core/Util/BytesRef.cs
index f79331f..dc3e4c4 100644
--- a/src/Lucene.Net.Core/Util/BytesRef.cs
+++ b/src/Lucene.Net.Core/Util/BytesRef.cs
@@ -38,11 +38,11 @@ namespace Lucene.Net.Util
     {
         /// <summary>
         /// An empty byte array for convenience </summary>
-        public static readonly sbyte[] EMPTY_BYTES = new sbyte[0];
+        public static readonly byte[] EMPTY_BYTES = new byte[0];
 
         /// <summary>
         /// The contents of the BytesRef. Should never be {@code null}. </summary>
-        public sbyte[] Bytes;
+        public byte[] Bytes;
 
         /// <summary>
         /// Offset of first valid byte. </summary>
@@ -63,7 +63,7 @@ namespace Lucene.Net.Util
         /// this instance will directly reference bytes w/o making a copy.
         /// bytes should not be null.
         /// </summary>
-        public BytesRef(sbyte[] bytes, int offset, int length)
+        public BytesRef(byte[] bytes, int offset, int length)
         {
             this.Bytes = bytes;
             this.Offset = offset;
@@ -75,7 +75,7 @@ namespace Lucene.Net.Util
         /// this instance will directly reference bytes w/o making a copy.
         /// bytes should not be null
         /// </summary>
-        public BytesRef(sbyte[] bytes)
+        public BytesRef(byte[] bytes)
             : this(bytes, 0, bytes.Length)
         {
         }
@@ -86,7 +86,7 @@ namespace Lucene.Net.Util
         /// </summary>
         public BytesRef(int capacity)
         {
-            this.Bytes = new sbyte[capacity];
+            this.Bytes = new byte[capacity];
         }
 
         /// <summary>
@@ -146,9 +146,9 @@ namespace Lucene.Net.Util
             Debug.Assert(other != null);
             if (Length == other.Length)
             {
-                int otherUpto = other.Offset;
-                sbyte[] otherBytes = other.Bytes;
-                int end = Offset + Length;
+                var otherUpto = other.Offset;
+                var otherBytes = other.Bytes;
+                var end = Offset + Length;
                 for (int upto = Offset; upto < end; upto++, otherUpto++)
                 {
                     if (Bytes[upto] != otherBytes[otherUpto])
@@ -240,7 +240,7 @@ namespace Lucene.Net.Util
         {
             if (Bytes.Length - Offset < other.Length)
             {
-                Bytes = new sbyte[other.Length];
+                Bytes = new byte[other.Length];
                 Offset = 0;
             }
             Array.Copy(other.Bytes, other.Offset, Bytes, Offset, other.Length);
@@ -258,7 +258,7 @@ namespace Lucene.Net.Util
             int newLen = Length + other.Length;
             if (Bytes.Length - Offset < newLen)
             {
-                sbyte[] newBytes = new sbyte[newLen];
+                var newBytes = new byte[newLen];
                 Array.Copy(Bytes, Offset, newBytes, 0, Length);
                 Offset = 0;
                 Bytes = newBytes;
@@ -309,9 +309,9 @@ namespace Lucene.Net.Util
 
             public virtual int Compare(BytesRef a, BytesRef b)
             {
-                sbyte[] aBytes = a.Bytes;
+                var aBytes = a.Bytes;
                 int aUpto = a.Offset;
-                sbyte[] bBytes = b.Bytes;
+                var bBytes = b.Bytes;
                 int bUpto = b.Offset;
 
                 int aStop = aUpto + Math.Min(a.Length, b.Length);
@@ -357,9 +357,9 @@ namespace Lucene.Net.Util
 
             public virtual int Compare(BytesRef a, BytesRef b)
             {
-                sbyte[] aBytes = a.Bytes;
+                var aBytes = a.Bytes;
                 int aUpto = a.Offset;
-                sbyte[] bBytes = b.Bytes;
+                var bBytes = b.Bytes;
                 int bUpto = b.Offset;
 
                 int aStop;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/BytesRefHash.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/BytesRefHash.cs b/src/Lucene.Net.Core/Util/BytesRefHash.cs
index f1e3ef6..704dfaa 100644
--- a/src/Lucene.Net.Core/Util/BytesRefHash.cs
+++ b/src/Lucene.Net.Core/Util/BytesRefHash.cs
@@ -321,7 +321,7 @@ namespace Lucene.Net.Util
                     }
                     Pool.NextBuffer();
                 }
-                sbyte[] buffer = Pool.Buffer;
+                var buffer = Pool.Buffer;
                 int bufferUpto = Pool.ByteUpto;
                 if (Count >= BytesStart.Length)
                 {
@@ -339,7 +339,7 @@ namespace Lucene.Net.Util
                 if (length < 128)
                 {
                     // 1 byte to store length
-                    buffer[bufferUpto] = (sbyte)length;
+                    buffer[bufferUpto] = (byte)length;
                     Pool.ByteUpto += length + 1;
                     Debug.Assert(length >= 0, "Length must be positive: " + length);
                     Array.Copy(bytes.Bytes, bytes.Offset, buffer, bufferUpto + 1, length);
@@ -347,8 +347,8 @@ namespace Lucene.Net.Util
                 else
                 {
                     // 2 byte to store length
-                    buffer[bufferUpto] = unchecked((sbyte)(0x80 | (length & 0x7f)));
-                    buffer[bufferUpto + 1] = unchecked((sbyte)((length >> 7) & 0xff));
+                    buffer[bufferUpto] = unchecked((byte)(0x80 | (length & 0x7f)));
+                    buffer[bufferUpto + 1] = unchecked((byte)((length >> 7) & 0xff));
                     Pool.ByteUpto += length + 2;
                     Array.Copy(bytes.Bytes, bytes.Offset, buffer, bufferUpto + 2, length);
                 }
@@ -469,7 +469,7 @@ namespace Lucene.Net.Util
                     {
                         int off = BytesStart[e0];
                         int start = off & ByteBlockPool.BYTE_BLOCK_MASK;
-                        sbyte[] bytes = Pool.Buffers[off >> ByteBlockPool.BYTE_BLOCK_SHIFT];
+                        var bytes = Pool.Buffers[off >> ByteBlockPool.BYTE_BLOCK_SHIFT];
                         int len;
                         int pos;
                         if ((bytes[start] & 0x80) == 0)
@@ -514,7 +514,7 @@ namespace Lucene.Net.Util
         }
 
         // TODO: maybe use long?  But our keys are typically short...
-        private int DoHash(sbyte[] bytes, int offset, int length)
+        private static int DoHash(byte[] bytes, int offset, int length)
         {
             return StringHelper.Murmurhash3_x86_32(bytes, offset, length, StringHelper.GOOD_FAST_HASH_SEED);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Fst/BytesRefFSTEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/BytesRefFSTEnum.cs b/src/Lucene.Net.Core/Util/Fst/BytesRefFSTEnum.cs
index 51ac203..9be4680 100644
--- a/src/Lucene.Net.Core/Util/Fst/BytesRefFSTEnum.cs
+++ b/src/Lucene.Net.Core/Util/Fst/BytesRefFSTEnum.cs
@@ -129,7 +129,7 @@ namespace Lucene.Net.Util.Fst
             }
             set
             {
-                Current_Renamed.Bytes[Upto] = (sbyte)value;
+                Current_Renamed.Bytes[Upto] = (byte)value;
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Fst/FST.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/FST.cs b/src/Lucene.Net.Core/Util/Fst/FST.cs
index 86608ed..4f5596b 100644
--- a/src/Lucene.Net.Core/Util/Fst/FST.cs
+++ b/src/Lucene.Net.Core/Util/Fst/FST.cs
@@ -507,7 +507,7 @@ namespace Lucene.Net.Util.Fst
                 RAMOutputStream ros = new RAMOutputStream();
                 Outputs.WriteFinalOutput(emptyOutput, ros);
 
-                sbyte[] emptyOutputBytes = new sbyte[(int)ros.FilePointer];
+                var emptyOutputBytes = new byte[(int)ros.FilePointer];
                 ros.WriteTo(emptyOutputBytes, 0);
 
                 if (!Packed)
@@ -517,7 +517,7 @@ namespace Lucene.Net.Util.Fst
                     int upto = 0;
                     while (upto < stopAt)
                     {
-                        sbyte b = emptyOutputBytes[upto];
+                        var b = emptyOutputBytes[upto];
                         emptyOutputBytes[upto] = emptyOutputBytes[emptyOutputBytes.Length - upto - 1];
                         emptyOutputBytes[emptyOutputBytes.Length - upto - 1] = b;
                         upto++;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Fst/Util.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/Util.cs b/src/Lucene.Net.Core/Util/Fst/Util.cs
index 4c15642..46260e9 100644
--- a/src/Lucene.Net.Core/Util/Fst/Util.cs
+++ b/src/Lucene.Net.Core/Util/Fst/Util.cs
@@ -1041,7 +1041,7 @@ namespace Lucene.Net.Util.Fst
                 int value = input.Ints[i + input.Offset];
                 // NOTE: we allow -128 to 255
                 Debug.Assert(value >= sbyte.MinValue && value <= 255, "value " + value + " doesn't fit into byte");
-                scratch.Bytes[i] = (sbyte)value;
+                scratch.Bytes[i] = (byte)value;
             }
             scratch.Length = input.Length;
             return scratch;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/GrowableByteArrayDataOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/GrowableByteArrayDataOutput.cs b/src/Lucene.Net.Core/Util/GrowableByteArrayDataOutput.cs
index 5a2b51b..0525b7f 100644
--- a/src/Lucene.Net.Core/Util/GrowableByteArrayDataOutput.cs
+++ b/src/Lucene.Net.Core/Util/GrowableByteArrayDataOutput.cs
@@ -27,7 +27,7 @@ namespace Lucene.Net.Util
     {
         /// <summary>
         /// The bytes </summary>
-        public sbyte[] Bytes;
+        public byte[] Bytes;
 
         /// <summary>
         /// The length </summary>
@@ -37,7 +37,7 @@ namespace Lucene.Net.Util
         /// Create a <seealso cref="GrowableByteArrayDataOutput"/> with the given initial capacity. </summary>
         public GrowableByteArrayDataOutput(int cp)
         {
-            this.Bytes = new sbyte[ArrayUtil.Oversize(cp, 1)];
+            this.Bytes = new byte[ArrayUtil.Oversize(cp, 1)];
             this.Length = 0;
         }
 
@@ -47,7 +47,7 @@ namespace Lucene.Net.Util
             {
                 Bytes = ArrayUtil.Grow(Bytes);
             }
-            Bytes[Length++] = (sbyte)b;
+            Bytes[Length++] = b;
         }
 
         public override void WriteBytes(byte[] b, int off, int len)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/NumericUtils.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/NumericUtils.cs b/src/Lucene.Net.Core/Util/NumericUtils.cs
index 41ce83a..a806358 100644
--- a/src/Lucene.Net.Core/Util/NumericUtils.cs
+++ b/src/Lucene.Net.Core/Util/NumericUtils.cs
@@ -148,16 +148,16 @@ namespace Lucene.Net.Util
             bytes.Length = nChars + 1; // one extra for the byte that contains the shift info
             if (bytes.Bytes.Length < bytes.Length)
             {
-                bytes.Bytes = new sbyte[NumericUtils.BUF_SIZE_LONG]; // use the max
+                bytes.Bytes = new byte[NumericUtils.BUF_SIZE_LONG]; // use the max
             }
-            bytes.Bytes[0] = (sbyte)(SHIFT_START_LONG + shift);
+            bytes.Bytes[0] = (byte)(SHIFT_START_LONG + shift);
             ulong sortableBits = BitConverter.ToUInt64(BitConverter.GetBytes(val), 0) ^ 0x8000000000000000L;
             sortableBits = sortableBits >> shift;
             while (nChars > 0)
             {
                 // Store 7 bits per byte for compatibility
                 // with UTF-8 encoding of terms
-                bytes.Bytes[nChars--] = (sbyte)(sortableBits & 0x7f);
+                bytes.Bytes[nChars--] = (byte)(sortableBits & 0x7f);
                 sortableBits = sortableBits >> 7;
             }
         }
@@ -180,16 +180,16 @@ namespace Lucene.Net.Util
             bytes.Length = nChars + 1; // one extra for the byte that contains the shift info
             if (bytes.Bytes.Length < bytes.Length)
             {
-                bytes.Bytes = new sbyte[NumericUtils.BUF_SIZE_LONG]; // use the max
+                bytes.Bytes = new byte[NumericUtils.BUF_SIZE_LONG]; // use the max
             }
-            bytes.Bytes[0] = (sbyte)(SHIFT_START_INT + shift);
+            bytes.Bytes[0] = (byte)(SHIFT_START_INT + shift);
             int sortableBits = val ^ unchecked((int)0x80000000);
             sortableBits = Number.URShift(sortableBits, shift);
             while (nChars > 0)
             {
                 // Store 7 bits per byte for compatibility
                 // with UTF-8 encoding of terms
-                bytes.Bytes[nChars--] = (sbyte)(sortableBits & 0x7f);
+                bytes.Bytes[nChars--] = (byte)(sortableBits & 0x7f);
                 sortableBits = (int)((uint)sortableBits >> 7);
             }
         }
@@ -235,7 +235,7 @@ namespace Lucene.Net.Util
             for (int i = val.Offset + 1, limit = val.Offset + val.Length; i < limit; i++)
             {
                 sortableBits <<= 7;
-                sbyte b = val.Bytes[i];
+                var b = val.Bytes[i];
                 if (b < 0)
                 {
                     throw new System.FormatException("Invalid prefixCoded numerical value representation (byte " + (b & 0xff).ToString("x") + " at position " + (i - val.Offset) + " is invalid)");
@@ -258,12 +258,12 @@ namespace Lucene.Net.Util
             for (int i = val.Offset, limit = val.Offset + val.Length; i < limit; i++)
             {
                 sortableBits <<= 7;
-                sbyte b = val.Bytes[i];
+                var b = val.Bytes[i];
                 if (b < 0)
                 {
                     throw new System.FormatException("Invalid prefixCoded numerical value representation (byte " + (b & 0xff).ToString("x") + " at position " + (i - val.Offset) + " is invalid)");
                 }
-                sortableBits |= (byte)b;
+                sortableBits |= (sbyte)b;
             }
             return (int)((sortableBits << GetPrefixCodedIntShift(val)) ^ 0x80000000);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/OpenBitSetIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/OpenBitSetIterator.cs b/src/Lucene.Net.Core/Util/OpenBitSetIterator.cs
index 8f3fc3d..dda1433 100644
--- a/src/Lucene.Net.Core/Util/OpenBitSetIterator.cs
+++ b/src/Lucene.Net.Core/Util/OpenBitSetIterator.cs
@@ -68,7 +68,7 @@ namespace Lucene.Net.Util
                 WordShift += 8;
                 Word = (long)((ulong)Word >> 8);
             }
-            IndexArray = BitUtil.BitList((sbyte)Word);
+            IndexArray = BitUtil.BitList((byte)Word);
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/PForDeltaDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/PForDeltaDocIdSet.cs b/src/Lucene.Net.Core/Util/PForDeltaDocIdSet.cs
index 41677c8..e385989 100644
--- a/src/Lucene.Net.Core/Util/PForDeltaDocIdSet.cs
+++ b/src/Lucene.Net.Core/Util/PForDeltaDocIdSet.cs
@@ -326,7 +326,7 @@ namespace Lucene.Net.Util
                 }
 
                 EncodeBlock();
-                sbyte[] dataArr = Arrays.CopyOf(Data.Bytes, Data.Length + MAX_BYTE_BLOCK_COUNT);
+                var dataArr = Arrays.CopyOf(Data.Bytes, Data.Length + MAX_BYTE_BLOCK_COUNT);
 
                 int indexSize = (NumBlocks - 1) / IndexInterval_Renamed + 1;
                 MonotonicAppendingLongBuffer docIDs, offsets;
@@ -365,11 +365,11 @@ namespace Lucene.Net.Util
             }
         }
 
-        internal readonly sbyte[] Data;
+        internal readonly byte[] Data;
         internal readonly MonotonicAppendingLongBuffer DocIDs, Offsets; // for the index
         internal readonly int Cardinality_Renamed, IndexInterval;
 
-        internal PForDeltaDocIdSet(sbyte[] data, int cardinality, int indexInterval, MonotonicAppendingLongBuffer docIDs, MonotonicAppendingLongBuffer offsets)
+        internal PForDeltaDocIdSet(byte[] data, int cardinality, int indexInterval, MonotonicAppendingLongBuffer docIDs, MonotonicAppendingLongBuffer offsets)
         {
             this.Data = data;
             this.Cardinality_Renamed = cardinality;
@@ -406,7 +406,7 @@ namespace Lucene.Net.Util
             internal readonly MonotonicAppendingLongBuffer DocIDs, Offsets;
 
             internal readonly int Cardinality;
-            internal readonly sbyte[] Data;
+            internal readonly byte[] Data;
             internal int Offset; // offset in data
 
             internal readonly int[] NextDocs;
@@ -417,7 +417,7 @@ namespace Lucene.Net.Util
             internal int BlockIdx;
             internal int DocID_Renamed;
 
-            internal Iterator(sbyte[] data, int cardinality, int indexInterval, MonotonicAppendingLongBuffer docIDs, MonotonicAppendingLongBuffer offsets)
+            internal Iterator(byte[] data, int cardinality, int indexInterval, MonotonicAppendingLongBuffer docIDs, MonotonicAppendingLongBuffer offsets)
             {
                 this.Data = data;
                 this.Cardinality = cardinality;
@@ -438,7 +438,7 @@ namespace Lucene.Net.Util
                 return DocID_Renamed;
             }
 
-            internal virtual void PforDecompress(sbyte token)
+            internal virtual void PforDecompress(byte token)
             {
                 int bitsPerValue = token & 0x1F;
                 if (bitsPerValue == 0)
@@ -470,13 +470,13 @@ namespace Lucene.Net.Util
                 }
             }
 
-            internal virtual void UnaryDecompress(sbyte token)
+            internal virtual void UnaryDecompress(byte token)
             {
                 Debug.Assert((token & HAS_EXCEPTIONS) == 0);
                 int docID = this.DocID_Renamed;
                 for (int i = 0; i < BLOCK_SIZE; )
                 {
-                    sbyte b = Data[Offset++];
+                    var b = Data[Offset++];
                     for (int bitList = BitUtil.BitList(b); bitList != 0; ++i, bitList = (int)((uint)bitList >> 4))
                     {
                         NextDocs[i] = docID + (bitList & 0x0F);
@@ -487,7 +487,7 @@ namespace Lucene.Net.Util
 
             internal virtual void DecompressBlock()
             {
-                sbyte token = Data[Offset++];
+                var token = Data[Offset++];
 
                 if ((token & UNARY) != 0)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/AbstractBlockPackedWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/AbstractBlockPackedWriter.cs b/src/Lucene.Net.Core/Util/Packed/AbstractBlockPackedWriter.cs
index b05d687..1868b79 100644
--- a/src/Lucene.Net.Core/Util/Packed/AbstractBlockPackedWriter.cs
+++ b/src/Lucene.Net.Core/Util/Packed/AbstractBlockPackedWriter.cs
@@ -50,7 +50,7 @@ namespace Lucene.Net.Util.Packed
 
         protected internal DataOutput @out;
         protected internal readonly long[] Values;
-        protected internal sbyte[] Blocks;
+        protected internal byte[] Blocks;
         protected internal int Off;
         protected internal long Ord_Renamed;
         protected internal bool Finished;
@@ -145,7 +145,7 @@ namespace Lucene.Net.Util.Packed
             int blockSize = encoder.ByteBlockCount() * iterations;
             if (Blocks == null || Blocks.Length < blockSize)
             {
-                Blocks = new sbyte[blockSize];
+                Blocks = new byte[blockSize];
             }
             if (Off < Values.Length)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BlockPackedReaderIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BlockPackedReaderIterator.cs b/src/Lucene.Net.Core/Util/Packed/BlockPackedReaderIterator.cs
index 5c9c402..9a4fb51 100644
--- a/src/Lucene.Net.Core/Util/Packed/BlockPackedReaderIterator.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BlockPackedReaderIterator.cs
@@ -98,7 +98,7 @@ namespace Lucene.Net.Util.Packed
         internal readonly int BlockSize;
         internal readonly long[] Values;
         internal readonly LongsRef ValuesRef;
-        internal sbyte[] Blocks;
+        internal byte[] Blocks;
         internal int Off;
         internal long Ord_Renamed;
 
@@ -192,7 +192,7 @@ namespace Lucene.Net.Util.Packed
             {
                 if (Blocks == null)
                 {
-                    Blocks = new sbyte[BlockSize];
+                    Blocks = new byte[BlockSize];
                 }
                 long skipped = 0;
                 while (skipped < count)
@@ -268,7 +268,7 @@ namespace Lucene.Net.Util.Packed
                 int blocksSize = iterations * decoder.ByteBlockCount();
                 if (Blocks == null || Blocks.Length < blocksSize)
                 {
-                    Blocks = new sbyte[blocksSize];
+                    Blocks = new byte[blocksSize];
                 }
 
                 int valueCount = (int)Math.Min(this.ValueCount - Ord_Renamed, BlockSize);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperation.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperation.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperation.cs
index 6826bef..8d58411 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperation.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperation.cs
@@ -27,19 +27,19 @@ namespace Lucene.Net.Util.Packed
     /// </summary>
     internal abstract class BulkOperation : PackedInts.Decoder, PackedInts.Encoder
     {
-        public abstract void Encode(int[] values, int valuesOffset, sbyte[] blocks, int blocksOffset, int iterations);
+        public abstract void Encode(int[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations);
 
         public abstract void Encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations);
 
-        public abstract void Encode(long[] values, int valuesOffset, sbyte[] blocks, int blocksOffset, int iterations);
+        public abstract void Encode(long[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations);
 
         public abstract void Encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations);
 
-        public abstract void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations);
+        public abstract void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations);
 
         public abstract void Decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations);
 
-        public abstract void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations);
+        public abstract void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations);
 
         public abstract void Decode(long[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations);
 
@@ -74,11 +74,11 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        protected internal virtual int WriteLong(long block, sbyte[] blocks, int blocksOffset)
+        protected internal virtual int WriteLong(long block, byte[] blocks, int blocksOffset)
         {
             for (int j = 1; j <= 8; ++j)
             {
-                blocks[blocksOffset++] = (sbyte)((long)((ulong)block >> (64 - (j << 3))));
+                blocks[blocksOffset++] = (byte)((long)((ulong)block >> (64 - (j << 3))));
             }
             return blocksOffset;
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked.cs
index dc564ca..3214d0b 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked.cs
@@ -102,7 +102,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             long nextValue = 0L;
             int bitsLeft = BitsPerValue;
@@ -155,7 +155,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             int nextValue = 0;
             int bitsLeft = BitsPerValue;
@@ -242,7 +242,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Encode(long[] values, int valuesOffset, sbyte[] blocks, int blocksOffset, int iterations)
+        public override void Encode(long[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations)
         {
             int nextBlock = 0;
             int bitsLeft = 8;
@@ -260,11 +260,11 @@ namespace Lucene.Net.Util.Packed
                 {
                     // flush as many blocks as possible
                     int bits = BitsPerValue - bitsLeft;
-                    blocks[blocksOffset++] = (sbyte)(nextBlock | ((long)((ulong)v >> bits)));
+                    blocks[blocksOffset++] = (byte)(nextBlock | ((long)((ulong)v >> bits)));
                     while (bits >= 8)
                     {
                         bits -= 8;
-                        blocks[blocksOffset++] = (sbyte)((long)((ulong)v >> bits));
+                        blocks[blocksOffset++] = (byte)((long)((ulong)v >> bits));
                     }
                     // then buffer
                     bitsLeft = 8 - bits;
@@ -274,7 +274,7 @@ namespace Lucene.Net.Util.Packed
             Debug.Assert(bitsLeft == 8);
         }
 
-        public override void Encode(int[] values, int valuesOffset, sbyte[] blocks, int blocksOffset, int iterations)
+        public override void Encode(int[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations)
         {
             int nextBlock = 0;
             int bitsLeft = 8;
@@ -292,11 +292,11 @@ namespace Lucene.Net.Util.Packed
                 {
                     // flush as many blocks as possible
                     int bits = BitsPerValue - bitsLeft;
-                    blocks[blocksOffset++] = (sbyte)(nextBlock | ((int)((uint)v >> bits)));
+                    blocks[blocksOffset++] = (byte)(nextBlock | ((int)((uint)v >> bits)));
                     while (bits >= 8)
                     {
                         bits -= 8;
-                        blocks[blocksOffset++] = (sbyte)((int)((uint)v >> bits));
+                        blocks[blocksOffset++] = (byte)((int)((uint)v >> bits));
                     }
                     // then buffer
                     bitsLeft = 8 - bits;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked1.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked1.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked1.cs
index a8101e8..76c53e1 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked1.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked1.cs
@@ -41,11 +41,11 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int j = 0; j < iterations; ++j)
             {
-                sbyte block = blocks[blocksOffset++];
+                var block = blocks[blocksOffset++];
                 values[valuesOffset++] = ((int)((uint)block >> 7)) & 1;
                 values[valuesOffset++] = ((int)((uint)block >> 6)) & 1;
                 values[valuesOffset++] = ((int)((uint)block >> 5)) & 1;
@@ -69,11 +69,11 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int j = 0; j < iterations; ++j)
             {
-                sbyte block = blocks[blocksOffset++];
+                var block = blocks[blocksOffset++];
                 values[valuesOffset++] = ((int)((uint)block >> 7)) & 1;
                 values[valuesOffset++] = ((int)((uint)block >> 6)) & 1;
                 values[valuesOffset++] = ((int)((uint)block >> 5)) & 1;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked10.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked10.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked10.cs
index 3b30e44..521d7b6 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked10.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked10.cs
@@ -73,7 +73,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -133,7 +133,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked11.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked11.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked11.cs
index 26189d7..f19f299 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked11.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked11.cs
@@ -111,7 +111,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -219,7 +219,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked12.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked12.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked12.cs
index f204b7c..c72492d 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked12.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked12.cs
@@ -55,7 +55,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -93,7 +93,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked13.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked13.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked13.cs
index f650464..c1f3f75 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked13.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked13.cs
@@ -113,7 +113,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -225,7 +225,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked14.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked14.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked14.cs
index db5a5e3..a8847ce 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked14.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked14.cs
@@ -75,7 +75,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -139,7 +139,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked15.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked15.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked15.cs
index e9f645b..dd8ef4e 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked15.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked15.cs
@@ -115,7 +115,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -231,7 +231,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked16.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked16.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked16.cs
index 8a54331..01c4bcf 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked16.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked16.cs
@@ -41,7 +41,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int j = 0; j < iterations; ++j)
             {
@@ -61,7 +61,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int j = 0; j < iterations; ++j)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked17.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked17.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked17.cs
index 0fda078..2fc2ff1 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked17.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked17.cs
@@ -117,7 +117,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -237,7 +237,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked18.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked18.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked18.cs
index edef331..6ed22d4 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked18.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked18.cs
@@ -77,7 +77,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -145,7 +145,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked19.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked19.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked19.cs
index 60d13c2..ed52c91 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked19.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked19.cs
@@ -119,7 +119,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -243,7 +243,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked2.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked2.cs
index 88bdb32..713b0fe 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked2.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked2.cs
@@ -41,11 +41,11 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int j = 0; j < iterations; ++j)
             {
-                sbyte block = blocks[blocksOffset++];
+                var block = blocks[blocksOffset++];
                 values[valuesOffset++] = ((int)((uint)block >> 6)) & 3;
                 values[valuesOffset++] = ((int)((uint)block >> 4)) & 3;
                 values[valuesOffset++] = ((int)((uint)block >> 2)) & 3;
@@ -65,11 +65,11 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int j = 0; j < iterations; ++j)
             {
-                sbyte block = blocks[blocksOffset++];
+                var block = blocks[blocksOffset++];
                 values[valuesOffset++] = ((int)((uint)block >> 6)) & 3;
                 values[valuesOffset++] = ((int)((uint)block >> 4)) & 3;
                 values[valuesOffset++] = ((int)((uint)block >> 2)) & 3;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked20.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked20.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked20.cs
index 9869374..95f7873 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked20.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked20.cs
@@ -57,7 +57,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -99,7 +99,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked21.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked21.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked21.cs
index ab524ce..d5daa92 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked21.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked21.cs
@@ -121,7 +121,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -249,7 +249,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked22.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked22.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked22.cs
index 76ff7b2..6f2ead3 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked22.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked22.cs
@@ -79,7 +79,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -151,7 +151,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked23.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked23.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked23.cs
index 38fdbe5..edca46c 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked23.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked23.cs
@@ -123,7 +123,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -255,7 +255,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked24.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked24.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked24.cs
index 2e0f9de..c8178c3 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked24.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked24.cs
@@ -47,7 +47,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -76,7 +76,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked3.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked3.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked3.cs
index 6f2abd6..ab99609 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked3.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked3.cs
@@ -103,7 +103,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -195,7 +195,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked4.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked4.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked4.cs
index 2f49b31..0c5279e 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked4.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked4.cs
@@ -41,11 +41,11 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int j = 0; j < iterations; ++j)
             {
-                sbyte block = blocks[blocksOffset++];
+                var block = blocks[blocksOffset++];
                 values[valuesOffset++] = ((int)((uint)block >> 4)) & 15;
                 values[valuesOffset++] = block & 15;
             }
@@ -63,11 +63,11 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int j = 0; j < iterations; ++j)
             {
-                sbyte block = blocks[blocksOffset++];
+                var block = blocks[blocksOffset++];
                 values[valuesOffset++] = ((int)((uint)block >> 4)) & 15;
                 values[valuesOffset++] = block & 15;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked5.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked5.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked5.cs
index c2fcb5b..ff32c4f 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked5.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked5.cs
@@ -105,7 +105,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -201,7 +201,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked6.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked6.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked6.cs
index 68a32da..6450d7a 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked6.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked6.cs
@@ -71,7 +71,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -127,7 +127,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked7.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked7.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked7.cs
index 2e93305..9ad7361 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked7.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked7.cs
@@ -107,7 +107,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -207,7 +207,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked8.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked8.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked8.cs
index 6acc676..fe96aba 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked8.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked8.cs
@@ -41,7 +41,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int j = 0; j < iterations; ++j)
             {
@@ -61,7 +61,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int j = 0; j < iterations; ++j)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/139ad812/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked9.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked9.cs b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked9.cs
index a6d099c..5d73724 100644
--- a/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked9.cs
+++ b/src/Lucene.Net.Core/Util/Packed/BulkOperationPacked9.cs
@@ -109,7 +109,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {
@@ -213,7 +213,7 @@ namespace Lucene.Net.Util.Packed
             }
         }
 
-        public override void Decode(sbyte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
+        public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
         {
             for (int i = 0; i < iterations; ++i)
             {


Mime
View raw message