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

Improve sql string literal escaping #805

Merged
merged 5 commits into from
Jun 16, 2014
Merged

Improve sql string literal escaping #805

merged 5 commits into from
Jun 16, 2014

Conversation

timowest
Copy link
Member

Related to #630

} else if (arg instanceof Expression) {
return OperationImpl.create(String.class, Ops.LOWER, (Expression)arg);
} else {
return arg.toString().toLowerCase(Locale.ENGLISH);
Copy link
Member

Choose a reason for hiding this comment

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

for all of these Functions, wouldn't it be safer to use String.valueOf() or use a nullcheck, just in case?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, sounds reasonable. I will replace toString() with String.valueOf().

timowest added a commit that referenced this pull request Jun 16, 2014
Improve sql string literal escaping
@timowest timowest merged commit 560cead into master Jun 16, 2014
@timowest timowest deleted the i630 branch June 16, 2014 15:18
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.

2 participants