lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [1/2] lucenenet git commit: Protect from null values as keys
Date Wed, 04 Feb 2015 09:35:57 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 511507fbb -> a4e60e32c


Protect from null values as keys


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

Branch: refs/heads/master
Commit: 16f2d8dfaefb1b049f65f2605aa2baf8356ccb62
Parents: 511507f
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Wed Feb 4 11:35:01 2015 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Wed Feb 4 11:35:01 2015 +0200

----------------------------------------------------------------------
 src/Lucene.Net.Core/Index/IndexWriter.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/16f2d8df/src/Lucene.Net.Core/Index/IndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexWriter.cs b/src/Lucene.Net.Core/Index/IndexWriter.cs
index 2715a2b..b8ac534 100644
--- a/src/Lucene.Net.Core/Index/IndexWriter.cs
+++ b/src/Lucene.Net.Core/Index/IndexWriter.cs
@@ -2135,7 +2135,7 @@ namespace Lucene.Net.Index
                 SegmentsToMerge.Clear();
                 foreach (SegmentCommitInfo info in segmentInfos.Segments)
                 {
-                    SegmentsToMerge[info] = true;
+                    if (info != null) SegmentsToMerge[info] = true;
                 }
                 MergeMaxNumSegments = maxNumSegments;
 
@@ -2144,13 +2144,13 @@ namespace Lucene.Net.Index
                 foreach (MergePolicy.OneMerge merge in PendingMerges)
                 {
                     merge.MaxNumSegments = maxNumSegments;
-                    SegmentsToMerge[merge.Info] = true;
+                    if (merge.Info != null) SegmentsToMerge[merge.Info] = true;
                 }
 
                 foreach (MergePolicy.OneMerge merge in RunningMerges)
                 {
                     merge.MaxNumSegments = maxNumSegments;
-                    SegmentsToMerge[merge.Info] = true;
+                    if (merge.Info != null) SegmentsToMerge[merge.Info] = true;
                 }
             }
 


Mime
View raw message