lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r883470 - in /incubator/lucene.net/trunk/C#/src/Lucene.Net: Search/FieldCache.cs SupportClass.cs
Date Mon, 23 Nov 2009 19:20:00 GMT
Author: aroush
Date: Mon Nov 23 19:19:59 2009
New Revision: 883470

URL: http://svn.apache.org/viewvc?rev=883470&view=rev
Log:
LUCENENET-299: Fix for TestStressSort

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCache.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCache.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FieldCache.cs?rev=883470&r1=883469&r2=883470&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCache.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCache.cs Mon Nov 23 19:19:59
2009
@@ -199,6 +199,10 @@
 	{
 		public virtual byte ParseByte(System.String value_Renamed)
 		{
+            if (value_Renamed[0] == '-')
+            {
+                return (byte) System.SByte.Parse(value_Renamed);
+            }
 			return (byte) System.Byte.Parse(value_Renamed);
 		}
 		protected internal virtual System.Object ReadResolve()

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/SupportClass.cs?rev=883470&r1=883469&r2=883470&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs Mon Nov 23 19:19:59 2009
@@ -1718,7 +1718,11 @@
                     result = true;
                     for (int index = 0; index < length; index++)
                     {
-                        if (!(array1.GetValue(index).Equals(array2.GetValue(index))))
+                        System.Object o1 = array1.GetValue(index);
+                        System.Object o2 = array2.GetValue(index);
+                        if (o1 == null && o2 == null)
+                            continue;   // they match
+                        else if (o1 == null || !o1.Equals(o2))
                         {
                             result = false;
                             break;



Mime
View raw message