[
https://issues.apache.org/jira/browse/COLLECTIONS-802?focusedWorklogId=761522&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-761522
]
ASF GitHub Bot logged work on COLLECTIONS-802:
----------------------------------------------
Author: ASF GitHub Bot
Created on: 24/Apr/22 21:27
Start Date: 24/Apr/22 21:27
Worklog Time Spent: 10m
Work Description: codecov-commenter commented on PR #300:
URL:
https://github.com/apache/commons-collections/pull/300#issuecomment-1107921839
#
[Codecov](https://codecov.io/gh/apache/commons-collections/pull/300?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
[#300](https://codecov.io/gh/apache/commons-collections/pull/300?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
(43e23dd) into
[master](https://codecov.io/gh/apache/commons-collections/commit/9df6f64b7ea729fff5d11fce6407cba249baafaa?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
(9df6f64) will **increase** coverage by `0.05%`.
> The diff coverage is `88.88%`.
```diff
@@ Coverage Diff @@
## master #300 +/- ##
============================================
+ Coverage 85.82% 85.88% +0.05%
- Complexity 4674 4676 +2
============================================
Files 292 292
Lines 13471 13469 -2
Branches 1955 1955
============================================
+ Hits 11562 11568 +6
+ Misses 1330 1324 -6
+ Partials 579 577 -2
```
| [Impacted
Files](https://codecov.io/gh/apache/commons-collections/pull/300?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
| Coverage Δ | |
|---|---|---|
|
[...commons/collections4/map/AbstractReferenceMap.java](https://codecov.io/gh/apache/commons-collections/pull/300/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-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L21hcC9BYnN0cmFjdFJlZmVyZW5jZU1hcC5qYXZh)
| `90.37% <88.88%> (+2.13%)` | :arrow_up: |
|
[.../apache/commons/collections4/map/ReferenceMap.java](https://codecov.io/gh/apache/commons-collections/pull/300/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-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L21hcC9SZWZlcmVuY2VNYXAuamF2YQ==)
| `75.00% <0.00%> (+12.50%)` | :arrow_up: |
------
[Continue to review full report at
Codecov](https://codecov.io/gh/apache/commons-collections/pull/300?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn
more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by
[Codecov](https://codecov.io/gh/apache/commons-collections/pull/300?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
Last update
[9df6f64...43e23dd](https://codecov.io/gh/apache/commons-collections/pull/300?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
Read the [comment
docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
Issue Time Tracking
-------------------
Worklog Id: (was: 761522)
Time Spent: 20m (was: 10m)
> ReferenceMap iterator remove violates contract
> ----------------------------------------------
>
> Key: COLLECTIONS-802
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-802
> Project: Commons Collections
> Issue Type: Bug
> Components: Map
> Affects Versions: 4.4
> Reporter: Ben Manes
> Priority: Minor
> Attachments: ApacheMapTest.java
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Out of curiosity I ran Guava's testlib Map tests against the Apache types.
> This uncovered a contract bug where {{Iterator.remove()}} is invalidated by
> {{{}hasNext(){}}}, causing its call to no-op due to {{currentKey}} becoming
> {{{}null{}}}. The isolates case is,
> {code:java}
> @Test
> public void iterator_remove() {
> var map = new ReferenceMap<>();
> map.put(1, 2);
> var iter = map.entrySet().iterator();
> assertTrue(iter.hasNext());
> assertTrue(iter.hasNext());
> assertEquals(iter.next(), 1);
> assertFalse(iter.hasNext());
> iter.remove();
> assertEquals(map, Map.of());
> }{code}
> Guava's [testlib|https://github.com/google/guava/tree/master/guava-testlib]
> has good coverage for the Collections Framework and might be worth
> integrating. The simple test case that I wrote is attached.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
