You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2016/08/23 23:18:24 UTC
[31/50] [abbrv] lucenenet git commit: Fixed bugs in the
Join.TestJoinUtil that were causing the TestSingleValueRandomJoin() test to
fail.
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/analysis-work
Commit: 5b9b2fedcd24523cb548054903a64e724e379e07
Parents: 5502415
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 10:22:11 2016 +0700
Committer: Shad Storhaug <sh...@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;