uschindler commented on PR #12134:
URL: https://github.com/apache/lucene/pull/12134#issuecomment-1419932992

   I found a bug, first test works, second one does not work:
   
   ```java
     public void testSameValue() {
       LongHashSet set2 = new LongHashSet(new long[] {42L, 42L});
       assertEquals(1, set2.size());
       assertEquals(42L, set2.minValue);
       assertEquals(42L, set2.maxValue);
     }
   
     public void testSameMissingPlaceholder() {
       LongHashSet set2 = new LongHashSet(new long[] {Long.MIN_VALUE, 
Long.MIN_VALUE});
       assertEquals(1, set2.size());
       assertEquals(Long.MIN_VALUE, set2.minValue);
       assertEquals(Long.MIN_VALUE, set2.maxValue);
     }
   ```
   
   The problem is that `MISSING` is counted twice, because it is not added to 
the hashtable and handled separately in ctor. The fix is easy...
   
   Will commit a fix, too.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to