Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError from Range.gap #4004

Closed
cpovirk opened this issue Sep 1, 2020 · 0 comments
Closed

AssertionError from Range.gap #4004

cpovirk opened this issue Sep 1, 2020 · 0 comments
Labels
P3 no SLO package=collect type=defect Bug, not working as expected

Comments

@cpovirk
Copy link
Member

cpovirk commented Sep 1, 2020

@zhanhb reports:

Range.atLeast(1).gap(Range.atLeast(2));
java.lang.AssertionError
	at com.google.common.collect.Cut$AboveAll.describeAsLowerBound(Cut.java:259)
	at com.google.common.collect.Range.toString(Range.java:674)
	at com.google.common.collect.Range.<init>(Range.java:357)
	at com.google.common.collect.Range.create(Range.java:155)
	at com.google.common.collect.Range.gap(Range.java:582)
@cpovirk cpovirk added type=defect Bug, not working as expected package=collect P3 no SLO labels Sep 1, 2020
cpovirk referenced this issue Sep 1, 2020
…two ranges. This operation is particularly useful as a replacement for Joda Time's Interval.gap when migrating to Java Time which has no Interval class.

Joda Time:
Interval interval = ...;
Interval gap = interval.gap(interval);

Java Time (after this CL):
Range<Instant> interval = ...;
Range<Instant> gap = interval.gap(otherInterval);

RELNOTES=Adds a gap() method to Range that computes the Range that lies between them.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208259360
kluever pushed a commit that referenced this issue Sep 17, 2020
Fixes #4007, #4004

RELNOTES=n/a

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=332057751
kluever pushed a commit that referenced this issue Sep 17, 2020
Fixes #4007, #4004

RELNOTES=n/a

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=332057751
@netdpb netdpb closed this as completed Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 no SLO package=collect type=defect Bug, not working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants