-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Issue #4004 AssertionError from Range.gap. #4007
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Thanks. I suspect that what we'd prefer is to avoid calling |
I think the problem is the ranges contain each other(intersection), it is illegal for Range.atMost(3).gap(Range.atMost(2)); java.lang.AssertionError
at com.google.common.collect.Cut$BelowAll.describeAsUpperBound(Cut.java:165)
at com.google.common.collect.Range.toString(Range.java:677)
at com.google.common.collect.Range.<init>(Range.java:358)
at com.google.common.collect.Range.create(Range.java:156)
at com.google.common.collect.Range.gap(Range.java:583) so, I added the ranges check for the |
Sounds reasonable, thanks. Would you also:
|
@cpovirk I added the test and the invalid ranges in the IAE message. |
Thanks. I got another set of eyes on this, and hopefully we'll get it submitted internally and merged out soon. |
Fixes #4007, #4004 RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=332057751
Fixes #4007, #4004 RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=332057751
Fix #4004, Got IAE instead of AssertionError.