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
Time values #147
Time values #147
Conversation
httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
Outdated
Show resolved
Hide resolved
httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi All,
I am -1 to this PR:
- Please keep the methods in alphabetical order (IOW, do not move them around.)
- There are no unit tests to prove that the Comparable interface is implemented properly.
Why is that? Is there any rational reason for keeping methods in alphabetical order? Some methods fulfill a common purpose and are a port of the the same contract such as |
I tend to agree with @ok2c that common methods should go together. |
@garydgregory Added test cases. |
For me, AB order is the simplest ordering. When I am in a plain text editor, I can find things easily; when I am in an IDE, I have the IDE set to sort methods in AB order; everything matches up. I never have to "search" for a method, it is always in an obvious place in a file. Anything beyond that invites more bike-shedding. You want to "group" methods together? Are the methods in each group in... AB order? What if a method belongs in more than one group? What group do you put the method in? Do the method groups come at the end or the beginning of a file? Why? How are the groups sorted? On and on. I never want to have to discuss this mess. In short, AB order follow the KISS principle. |
@garydgregory I fail to see how getters and setters being in completely different places may be "obvious" to anyone but so be it. I will back out that commit. |
@ok2c it's all a matter of perspective, as one could equally be disturbed that setters are scattered all over a file instead of all in one place. Same for getters. In this case the get and set methods are groups of sorts, one for reading, the other for writing. It's all about what kind of POV you take when looking at a file. |
@garydgregory And from my POV |
@garydgregory Please review the updated change-set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now.
@garydgregory TimeValue is mostly your code. Could you please please take a look at this change-set and let me know if you find anything disagreeable?