-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
HHH-13884 Order.reverse() contract #3272
HHH-13884 Order.reverse() contract #3272
Conversation
private SqmExpression sortExpression; | ||
private String collation; | ||
private SortOrder sortOrder; | ||
private final NullPrecedence nullPrecedence; |
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.
please note: nullPrecenence
duplicates precedence
field.
nullPrecendence
was assigned only in constructor and never used, all other access is done to precedence
field.
I looks like a defect. I fixed it, because otherwise I could not write a test to validate all assignments in this class.
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.
I prefer the name nullPrecedence
- its more consistent and self-documenting
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.
fixed
bbcb6f6
to
1a807a0
Compare
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.
Minor request to change field name. Other than that - +1
private SqmExpression sortExpression; | ||
private String collation; | ||
private SortOrder sortOrder; | ||
private final NullPrecedence nullPrecedence; |
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.
I prefer the name nullPrecedence
- its more consistent and self-documenting
@sebersole requested change addressed. Still any objections to merge it? |
@sebersole @beikov please make a decision on it. It was created half a year ago. If you don't like it, lets close. |
Could you please rebase it, I can't merge it right now. |
7fa3416
to
22def92
Compare
@beikov rebased on top of |
https://hibernate.atlassian.net/browse/HHH-13884
backported in #3271
javax.persistence.criteria.Order.reverse() method javadoc explicitly declares that
reverse()
should return new instance.