You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Shad Storhaug (JIRA)" <ji...@apache.org> on 2017/06/28 19:52:00 UTC

[jira] [Commented] (LUCENENET-529) ArgumentOutOfRangeException exception in Lucene.Net.Spatial.Util.FixedBitSet

    [ https://issues.apache.org/jira/browse/LUCENENET-529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067125#comment-16067125 ] 

Shad Storhaug commented on LUCENENET-529:
-----------------------------------------

It is unclear whether this issue affects 4.8.0. John, could you add a simple test or console application to produce the IndexOutOfRangeException? The tests you provided cover the code that you provided, but there is no way to verify the problem that is supposedly fixed here exists in the first place.

> ArgumentOutOfRangeException exception in Lucene.Net.Spatial.Util.FixedBitSet
> ----------------------------------------------------------------------------
>
>                 Key: LUCENENET-529
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-529
>             Project: Lucene.Net
>          Issue Type: Bug
>          Components: Lucene.Net Contrib
>    Affects Versions: Lucene.Net 3.0.3
>         Environment: x64 asp.net mvc 5
>            Reporter: John Diss
>            Assignee: Itamar Syn-Hershko
>         Attachments: lucene.net.contrib.spatial.patch, lucene.net.contrib.spatial.test.patch
>
>
> When the FixedBitSet is created it is initialized to MaxDoc length, however MaxDoc should be a valid index in the set. Either the indices need to be modified in the Get and Set methods or the set is grown by 1. Growing the set  requires the fewest code changes elsewhere.
> Index: src/contrib/Spatial/Util/FixedBitSet.cs
> ===================================================================
> --- src/contrib/Spatial/Util/FixedBitSet.cs	(revision 1545729)
> +++ src/contrib/Spatial/Util/FixedBitSet.cs	(working copy)
> @@ -52,7 +52,7 @@
>  
>  		public FixedBitSet(int numBits)
>  		{
> -			bits = new BitArray(numBits);
> +			bits = new BitArray(numBits+1);
>  		}
>  
>  		/// <summary>



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)