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

Make LogSequenceNumber implement Comparable<LogSequenceNumber> #1494

Merged
merged 3 commits into from Jun 6, 2019

Conversation

Projects
None yet
5 participants
@maltalex
Copy link
Contributor

commented Jun 3, 2019

Regarding #1493:

added a Java 6 - compatible compareTo implementation for LogSequenceNumber, so it implements Comparable<LogSequenceNumber>.

@AppVeyorBot

This comment has been minimized.

Copy link

commented Jun 3, 2019

@codecov-io

This comment has been minimized.

Copy link

commented Jun 3, 2019

Codecov Report

Merging #1494 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master    #1494      +/-   ##
============================================
+ Coverage      68.8%   68.82%   +0.01%     
- Complexity     3930     3933       +3     
============================================
  Files           179      179              
  Lines         16458    16461       +3     
  Branches       2672     2673       +1     
============================================
+ Hits          11324    11329       +5     
+ Misses         3889     3887       -2     
  Partials       1245     1245
@AppVeyorBot

This comment has been minimized.

Copy link

commented Jun 3, 2019

@jorsol

jorsol approved these changes Jun 6, 2019

@davecramer

This comment has been minimized.

Copy link
Member

commented Jun 6, 2019

@maltalex I think it would be useful to attempt to prove that our unsigned comparison works. Not that I am doubting that it works, just that if the code is there we should test it.

@maltalex

This comment has been minimized.

Copy link
Contributor Author

commented Jun 6, 2019

@davecramer Sure, I can add more tests. Do you have a specific test in mind? I feel like I covered basic comparisons as well as the edge cases like comparing a "positive" with a "negative", comparing two "negatives" etc.

Would you like to see something like a comparison of every pair of numbers from a pre-generated sorted list of numbers?

@davecramer

This comment has been minimized.

Copy link
Member

commented Jun 6, 2019

@maltalex whoops sorry I missed the negative case when I first looked

@davecramer davecramer merged commit 1970c4a into pgjdbc:master Jun 6, 2019

3 checks passed

codecov/project 68.82% (+0.01%) compared to 12ef697
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.