lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [13/18] lucenenet git commit: Fixed bugs in the Join.TestJoinUtil that were causing the TestSingleValueRandomJoin() test to fail.
Date Sun, 21 Aug 2016 06:54:52 GMT
Fixed bugs in the Join.TestJoinUtil that were causing the TestSingleValueRandomJoin() test
to fail.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/5b9b2fed
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/5b9b2fed
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/5b9b2fed

Branch: refs/heads/master
Commit: 5b9b2fedcd24523cb548054903a64e724e379e07
Parents: 5502415
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Aug 21 10:22:11 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Aug 21 10:22:11 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests.Join/TestJoinUtil.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5b9b2fed/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Join/TestJoinUtil.cs b/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
index 1d2da10..4e25017 100644
--- a/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
+++ b/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
@@ -892,7 +892,7 @@ namespace Lucene.Net.Tests.Join
             private readonly IDictionary<int, JoinScore> _docToJoinScore;
 
             private SortedSetDocValues docTermOrds;
-            private readonly BytesRef scratch;
+            private readonly BytesRef scratch = new BytesRef();
             private int docBase;
 
             public CollectorAnonymousInnerClassHelper5(TestJoinUtil testJoinUtil, IndexIterationContext
context, 
@@ -958,7 +958,7 @@ namespace Lucene.Net.Tests.Join
 
             private BinaryDocValues terms;
             private int docBase;
-            private readonly BytesRef spare;
+            private readonly BytesRef spare = new BytesRef();
 
             public CollectorAnonymousInnerClassHelper6(TestJoinUtil testJoinUtil, 
                 IndexIterationContext context, string toField, 
@@ -974,7 +974,7 @@ namespace Lucene.Net.Tests.Join
             public override void Collect(int doc)
             {
                 terms.Get(doc, spare);
-                JoinScore joinScore = JoinValueToJoinScores[spare];
+                JoinScore joinScore = JoinValueToJoinScores.ContainsKey(spare) ? JoinValueToJoinScores[spare]
: null;
                 if (joinScore == null)
                 {
                     return;


Mime
View raw message