-
Notifications
You must be signed in to change notification settings - Fork 52
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
clarify the parameter order of the locate() function #347
Conversation
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.
That's indeed way better, thanks!
@@ -1170,6 +1170,8 @@ | |||
* if found. | |||
* The first position in a string is denoted by 1. If the | |||
* string to be located is not found, 0 is returned. | |||
* <p>Warning: the order of the parameters of this method is |
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.
should the word Warning be bold/strong?
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.
Sure, if you like.
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.
update the copyright year in modified files to have 2022, please
OK. |
Done. |
it needs to follow https://www.eclipse.org/projects/handbook/#ip-copyright-headers : The date may optionally be set to a range of years with the first and last years of the range separated by a comma (e.g. “2004, 2017”); in this case, the first year is when the content was first created and the last year is when the content was last modified. I know how annoying is keeping this up-to-date... |
The current wording is very difficult for non-native speakers to understand, "located" being almost a synonym for "searched", and was apparently even misread by the person who wrote CriteriaBuilder, since CriteriaBuilder.locate() gets the parameters in the "wrong" order.
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, thanks!
Perfect, thank you! |
The current wording is very difficult for non-native speakers to understand, "located" being almost a synonym for "searched", and was apparently even misread by the person who wrote
CriteriaBuilder
, sinceCriteriaBuilder.locate()
gets the parameters in the "wrong" order.I have (a bit laboriously) clarified the semantics of the JPQL function
locate()
, and added a warning to the Javadoc ofCriteriaBuilder.locate()
.