You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/08/22 09:39:30 UTC
[GitHub] [commons-collections] Claudenw opened a new pull request, #330: Implemented clear() for CASSANDRA-831
Claudenw opened a new pull request, #330:
URL: https://github.com/apache/commons-collections/pull/330
- Defined BloomFilter.clear() to be a reset to unpopulated state.
- Modified BloomFilter implementations.
- Added test case.
Fix for COLLECTIONS-831
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [commons-collections] aherbert commented on pull request #330: Implemented clear() for COLLECTIONS-831
Posted by GitBox <gi...@apache.org>.
aherbert commented on PR #330:
URL: https://github.com/apache/commons-collections/pull/330#issuecomment-1222619701
@Claudenw after a lot of commits I think the files are back to the state where we started. So the change to use assertEquals is no longer present, and no change to use assertNotEquals.
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [commons-collections] aherbert commented on pull request #330: Implemented clear() for COLLECTIONS-831
Posted by GitBox <gi...@apache.org>.
aherbert commented on PR #330:
URL: https://github.com/apache/commons-collections/pull/330#issuecomment-1222380585
The updates have introduced some code duplications. Also you did not update to use `assertNotEquals` in the test for the non-empty filter.
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [commons-collections] aherbert closed pull request #330: Implemented clear() for COLLECTIONS-831
Posted by GitBox <gi...@apache.org>.
aherbert closed pull request #330: Implemented clear() for COLLECTIONS-831
URL: https://github.com/apache/commons-collections/pull/330
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [commons-collections] codecov-commenter commented on pull request #330: Implemented clear() for COLLECTIONS-831
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #330:
URL: https://github.com/apache/commons-collections/pull/330#issuecomment-1223620533
# [Codecov](https://codecov.io/gh/apache/commons-collections/pull/330?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#330](https://codecov.io/gh/apache/commons-collections/pull/330?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b76cfac) into [master](https://codecov.io/gh/apache/commons-collections/commit/2af77aaa6b5c39af49f18e8c1014f8e7e3958753?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af77aa) will **increase** coverage by `0.00%`.
> The diff coverage is `100.00%`.
```diff
@@ Coverage Diff @@
## master #330 +/- ##
=========================================
Coverage 86.01% 86.02%
- Complexity 4675 4678 +3
=========================================
Files 288 288
Lines 13473 13480 +7
Branches 1980 1980
=========================================
+ Hits 11589 11596 +7
Misses 1323 1323
Partials 561 561
```
| [Impacted Files](https://codecov.io/gh/apache/commons-collections/pull/330?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ections4/bloomfilter/ArrayCountingBloomFilter.java](https://codecov.io/gh/apache/commons-collections/pull/330/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L2Jsb29tZmlsdGVyL0FycmF5Q291bnRpbmdCbG9vbUZpbHRlci5qYXZh) | `100.00% <100.00%> (ø)` | |
| [.../commons/collections4/bloomfilter/BloomFilter.java](https://codecov.io/gh/apache/commons-collections/pull/330/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L2Jsb29tZmlsdGVyL0Jsb29tRmlsdGVyLmphdmE=) | `100.00% <100.00%> (ø)` | |
| [...ns/collections4/bloomfilter/SimpleBloomFilter.java](https://codecov.io/gh/apache/commons-collections/pull/330/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L2Jsb29tZmlsdGVyL1NpbXBsZUJsb29tRmlsdGVyLmphdmE=) | `94.44% <100.00%> (+0.19%)` | :arrow_up: |
| [...ns/collections4/bloomfilter/SparseBloomFilter.java](https://codecov.io/gh/apache/commons-collections/pull/330/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L2Jsb29tZmlsdGVyL1NwYXJzZUJsb29tRmlsdGVyLmphdmE=) | `96.73% <100.00%> (+0.07%)` | :arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [commons-collections] kinow commented on a diff in pull request #330: Implemented clear() for CASSANDRA-831
Posted by GitBox <gi...@apache.org>.
kinow commented on code in PR #330:
URL: https://github.com/apache/commons-collections/pull/330#discussion_r951227785
##########
src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java:
##########
@@ -177,6 +177,14 @@ public final void testContains() {
assertFalse(bf1.contains(bf4));
assertTrue(bf4.contains(bf1));
}
+
+ @Test
+ public void testClear() {
+ BloomFilter bf1 = createFilter(getTestShape(), from1);
+ assertTrue( bf1.cardinality()>0 );
+ bf1.clear();
+ assertTrue( bf1.cardinality()==0);
Review Comment:
`assertEquals(0, bf1.cardinality())`
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [commons-collections] kinow commented on pull request #330: Implemented clear() for COLLECTIONS-831
Posted by GitBox <gi...@apache.org>.
kinow commented on PR #330:
URL: https://github.com/apache/commons-collections/pull/330#issuecomment-1222124704
Looks good to me. One suggestion for the unit test assertion, but not a blocker IMO. Thanks!
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [commons-collections] aherbert commented on a diff in pull request #330: Implemented clear() for COLLECTIONS-831
Posted by GitBox <gi...@apache.org>.
aherbert commented on code in PR #330:
URL: https://github.com/apache/commons-collections/pull/330#discussion_r951276954
##########
src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java:
##########
@@ -177,6 +177,14 @@ public final void testContains() {
assertFalse(bf1.contains(bf4));
assertTrue(bf4.contains(bf1));
}
+
+ @Test
+ public void testClear() {
+ BloomFilter bf1 = createFilter(getTestShape(), from1);
+ assertTrue( bf1.cardinality()>0 );
Review Comment:
This should use the opposite of assertEquals:
```Java
assertNotEquals(0, bf1.cardinality())
```
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [commons-collections] aherbert commented on pull request #330: Implemented clear() for COLLECTIONS-831
Posted by GitBox <gi...@apache.org>.
aherbert commented on PR #330:
URL: https://github.com/apache/commons-collections/pull/330#issuecomment-1223878272
Closed by 5a31023eae4bf2bd621fa8613699f54842109402
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org