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

Comparing Version.UNKNOWN with other versions yields surprising results #10755

Closed
vbekiaris opened this issue Jun 14, 2017 · 0 comments
Closed

Comparing Version.UNKNOWN with other versions yields surprising results #10755

vbekiaris opened this issue Jun 14, 2017 · 0 comments

Comments

@vbekiaris
Copy link
Contributor

@vbekiaris vbekiaris commented Jun 14, 2017

As is:

UNKNOWN.isLessThan(V3_9) -> true
Version.of(0, 1).isGreaterThan(UNKNOWN) -> true

Proposed amendment:

  • UNKNOWN is only equal to itself
  • is(Less|Greater)Than method with an UNKNOWN operand must return false
  • is(Less|Greater)OrEqual with an UNKNOWN operand must return false, unless both operands are UNKNOWN -> true
  • UNKNOWN.isUnknown(Less|Greater)(Than|OrEqual) must return true
  • otherVersion.isUnknown(Less|Greater)(Than|OrEqual) with an UNKNOWN argument must return false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.