You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by uppi <gi...@git.apache.org> on 2015/10/06 14:19:22 UTC

[GitHub] lucenenet pull request: Fix OpenBitSet.Union and .Xor methods.

GitHub user uppi opened a pull request:

    https://github.com/apache/lucenenet/pull/154

    Fix OpenBitSet.Union and .Xor methods.

    EnsureCapacityWords method changes this.Wlen to newLen,
    so we have to save this.Wlen value before calling it.
    
    Bugged version never copied the tail of the bigger array.
    It worked correctly, but inefficiently.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/uppi/lucenenet master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucenenet/pull/154.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #154
    
----
commit 48ea4c7a137673a7c781a5f933198ae53a2c0ab5
Author: uppi <he...@ispras.ru>
Date:   2015-10-06T12:14:03Z

    Fix OpenBitSet.Union and .Xor methods.
    
    EnsureCapacityWords method changes this.Wlen to newLen,
    so we have to save this.Wlen value before calling it.
    
    Bugged version never copied the tail of the bigger array.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] lucenenet pull request: Fix OpenBitSet.Union and .Xor methods.

Posted by synhershko <gi...@git.apache.org>.
Github user synhershko commented on a diff in the pull request:

    https://github.com/apache/lucenenet/pull/154#discussion_r42593117
  
    --- Diff: src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs ---
    @@ -514,5 +514,24 @@ public virtual void TestEnsureCapacity()
                 bits.FastSet(bit - 1);
                 Assert.IsTrue(bits.FastGet(bit - 1));
             }
    +
    +        [Test]
    +        public virtual void TestXorWithDifferentCapacity()
    --- End diff --
    
    can you please mark this / comment that this is Lucene.NET specific (so we don't accidently delete it in future ports)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---