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

clarify the parameter order of the locate() function #347

Merged
merged 1 commit into from
Jan 18, 2022

Conversation

gavinking
Copy link
Contributor

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.

I have (a bit laboriously) clarified the semantics of the JPQL function locate(), and added a warning to the Javadoc of CriteriaBuilder.locate().

@gavinking gavinking requested a review from lukasj January 18, 2022 14:11
Copy link

@beikov beikov left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, if you like.

Copy link
Contributor

@lukasj lukasj left a 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

@gavinking
Copy link
Contributor Author

update the copyright year in modified files to have 2022, please

OK.

@gavinking
Copy link
Contributor Author

Done.

@lukasj
Copy link
Contributor

lukasj commented Jan 18, 2022

update the copyright year in modified files to have 2022, please

OK.

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...

@lukasj lukasj linked an issue Jan 18, 2022 that may be closed by this pull request
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.
Copy link
Contributor

@lukasj lukasj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@lukasj lukasj merged commit 4c58381 into jakartaee:master Jan 18, 2022
@gavinking
Copy link
Contributor Author

Perfect, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clarify the parameter order of the locate() function
3 participants