Skip to content

Conversation

@copybara-service
Copy link
Contributor

Fix calling remove after entry.setValue on an iterator for HashBiMap.inverse().

Also, add tests that apply not just to HashBiMap but to Map implementations in general.

Gemini noticed this bug during the review for cl/778043974. It observed that our code for the inverse-direction BiMap was missing this call that we have in the code for the "main" direction BiMap.

The bug appears to have existed since cl/35322418 in 2012.

RELNOTES=n/a

…iMap.inverse()`.

Also, add tests that apply not just to `HashBiMap` but to `Map` implementations in general.

Gemini noticed this bug during the review for cl/778043974. It observed that our code for the inverse-direction `BiMap` was missing this call that we have in the code for the "main" direction `BiMap`.

The bug appears to have existed since cl/35322418 in 2012.

RELNOTES=n/a
PiperOrigin-RevId: 845025562
@copybara-service copybara-service bot merged commit db97519 into master Dec 16, 2025
@copybara-service copybara-service bot deleted the test_844812273 branch December 16, 2025 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant