lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r718001 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DocumentsWriter.cs
Date Sun, 16 Nov 2008 11:01:19 GMT
Author: digy
Date: Sun Nov 16 03:01:19 2008
New Revision: 718001

URL: http://svn.apache.org/viewvc?rev=718001&view=rev
Log:
DocumentsWriter.patch in LUCENENET-145 (Bug in documentswriter.cs).
Includes also LUCENENET-142 (NUnit test for Index/TestIndexWriter/TestDiverseDoc).

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DocumentsWriter.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DocumentsWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/DocumentsWriter.cs?rev=718001&r1=718000&r2=718001&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DocumentsWriter.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DocumentsWriter.cs Sun Nov 16 03:01:19
2008
@@ -3464,7 +3464,7 @@
 					
 					for (int i = 0; i < bufferUpto; i++)
 						// Fully zero fill buffers that we fully used
-						Array.Clear(buffers[i], 0, buffers.Length);
+						Array.Clear(buffers[i], 0, buffers[i].Length);
 					
 					// Partial zero fill the final buffer
 					Array.Clear(buffers[bufferUpto], 0, byteUpto);
@@ -3483,10 +3483,10 @@
 			
 			public void  NextBuffer()
 			{
-				if (1 + bufferUpto == buffers.Length)
+				if (1 + bufferUpto == buffers.GetLength(0))
 				{
-					byte[][] newBuffers = new byte[(int) (buffers.Length * 1.5)][];
-					Array.Copy(buffers, 0, newBuffers, 0, buffers.Length);
+					byte[][] newBuffers = new byte[(int) (buffers.GetLength(0) * 1.5)][];
+					Array.Copy(buffers, 0, newBuffers, 0, buffers.GetLength(0));
 					buffers = newBuffers;
 				}
 				buffer = buffers[1 + bufferUpto] = Enclosing_Instance.GetByteBlock();
@@ -3579,10 +3579,10 @@
 			
 			public void  NextBuffer()
 			{
-				if (1 + bufferUpto == buffers.Length)
+				if (1 + bufferUpto == buffers.GetLength(0))
 				{
-					char[][] newBuffers = new char[(int) (buffers.Length * 1.5)][];
-					Array.Copy(buffers, 0, newBuffers, 0, buffers.Length);
+					char[][] newBuffers = new char[(int) (buffers.GetLength(0) * 1.5)][];
+					Array.Copy(buffers, 0, newBuffers, 0, buffers.GetLength(0));
 					buffers = newBuffers;
 				}
 				buffer = buffers[1 + bufferUpto] = Enclosing_Instance.GetCharBlock();
@@ -3940,4 +3940,4 @@
 			docWriter.SetAborting();
 		}
 	}
-}
\ No newline at end of file
+}



Mime
View raw message