lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [03/18] lucenenet git commit: Fixed some "key not found" bugs in the Join.TestJoinUtil class.
Date Sun, 21 Aug 2016 06:54:42 GMT
Fixed some "key not found" bugs in the Join.TestJoinUtil class.


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

Branch: refs/heads/master
Commit: 22663d7ae0642af5f3adc59618413b55d48acab3
Parents: 406f88a
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Aug 21 07:43:11 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Aug 21 07:43: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/22663d7a/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 81513c7..7e20840 100644
--- a/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
+++ b/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
@@ -796,7 +796,7 @@ namespace Lucene.Net.Tests.Join
                 while ((ord = docTermOrds.NextOrd()) != SortedSetDocValues.NO_MORE_ORDS)
                 {
                     docTermOrds.LookupOrd(ord, joinValue);
-                    var joinScore = JoinValueToJoinScores[joinValue];
+                    var joinScore = JoinValueToJoinScores.ContainsKey(joinValue) ? JoinValueToJoinScores[joinValue]
: null;
                     if (joinScore == null)
                     {
                         JoinValueToJoinScores[BytesRef.DeepCopyOf(joinValue)] = joinScore
= new JoinScore();
@@ -855,7 +855,7 @@ namespace Lucene.Net.Tests.Join
                     return;
                 }
 
-                var joinScore = JoinValueToJoinScores[joinValue];
+                var joinScore = JoinValueToJoinScores.ContainsKey(joinValue) ? JoinValueToJoinScores[joinValue]
: null;
                 if (joinScore == null)
                 {
                     JoinValueToJoinScores[BytesRef.DeepCopyOf(joinValue)] = joinScore = new
JoinScore();
@@ -912,7 +912,7 @@ namespace Lucene.Net.Tests.Join
                 while ((ord = docTermOrds.NextOrd()) != SortedSetDocValues.NO_MORE_ORDS)
                 {
                     docTermOrds.LookupOrd(ord, scratch);
-                    JoinScore joinScore = _joinValueToJoinScores[scratch];
+                    JoinScore joinScore = _joinValueToJoinScores.ContainsKey(scratch) ? _joinValueToJoinScores[scratch]
: null;
                     if (joinScore == null)
                     {
                         continue;


Mime
View raw message