Repository navigation
Make span() throw for empty TreeRangeMap.subRangeMap views with an empty restriction. - #8907
Merged
Merged
Conversation
…n empty restriction. If the restriction passed to `subRangeMap` was an empty range (e.g. `Range.closedOpen(5, 5)`) lying inside a stored entry, `span()` returned that empty range instead of throwing `NoSuchElementException` as `RangeMap.span()` specifies for an empty map. Fixes #8855 Fixes #8856 RELNOTES=`collect`: Fixed `TreeRangeMap.subRangeMap(emptyRange).span()` to throw `NoSuchElementException` instead of returning an empty range. PiperOrigin-RevId: 1029069843
copybara-service
Bot
force-pushed
the
test_1022760521
branch
from
November 24, 2026 16:22
be17e1e to
d0e7d9a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make
span()throw for emptyTreeRangeMap.subRangeMapviews with an empty restriction.If the restriction passed to
subRangeMapwas an empty range (e.g.Range.closedOpen(5, 5)) lying inside a stored entry,span()returned that empty range instead of throwingNoSuchElementExceptionasRangeMap.span()specifies for an empty map.Fixes #8855
Fixes #8856
RELNOTES=
collect: FixedTreeRangeMap.subRangeMap(emptyRange).span()to throwNoSuchElementExceptioninstead of returning an empty range.