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 2014/09/16 00:53:01 UTC
[10/13] git commit: Fixed TestLongBitSet.TestPrevBitSet
Fixed TestLongBitSet.TestPrevBitSet
Used BitSet.SafeGet and Bitset.SafeSet (the methods with Java BitSet
semantics.) Commented out a line that was commented out in the original
Java source.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/e232ed46
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/e232ed46
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/e232ed46
Branch: refs/heads/master
Commit: e232ed4643a93895b987a79b895fe1d0a2dfa4e3
Parents: a3b7505
Author: Prad Nelluru <pr...@microsoft.com>
Authored: Fri Sep 12 15:24:43 2014 -0700
Committer: Prad Nelluru <pr...@microsoft.com>
Committed: Fri Sep 12 15:24:43 2014 -0700
----------------------------------------------------------------------
src/Lucene.Net.Core/Support/BitSetSupport.cs | 2 +-
src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e232ed46/src/Lucene.Net.Core/Support/BitSetSupport.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/BitSetSupport.cs b/src/Lucene.Net.Core/Support/BitSetSupport.cs
index 7b816d0..3ffa0a8 100644
--- a/src/Lucene.Net.Core/Support/BitSetSupport.cs
+++ b/src/Lucene.Net.Core/Support/BitSetSupport.cs
@@ -58,7 +58,7 @@ namespace Lucene.Net.Support
{
// if index bit is set, return it
// otherwise check previous index bit
- if (bitArray.Get(index))
+ if (bitArray.SafeGet(index))
return index;
index--;
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e232ed46/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs
index 1c7f626..a9264e8 100644
--- a/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs
@@ -55,9 +55,9 @@ namespace Lucene.Net.Util
long bb = aa;
do
{
- aa = a.PrevSetBit(aa-1);
+ //aa = a.PrevSetBit(aa-1);
aa--;
- while ((aa >= 0) && (!a.Get(aa)))
+ while ((aa >= 0) && (!a.SafeGet(aa)))
{
aa--;
}
@@ -318,7 +318,7 @@ namespace Lucene.Net.Util
BitArray bs = new BitArray(a.Length);
foreach (int e in a)
{
- bs.Set(e, true);
+ bs.SafeSet(e, true);
}
return bs;
}