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

Use Locale.ROOT when user toUpperCase or toLowerCase #6049

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

cppwfs
Copy link
Contributor

@cppwfs cppwfs commented Nov 5, 2024

resolves #6048

@cppwfs cppwfs changed the title Use Locale.ROOT when user toUpperCase or toLowerCase. Use Locale.ROOT when user toUpperCase or toLowerCase Nov 5, 2024
@@ -52,7 +53,7 @@ public class PostgreSQLTextToOID {
public static void convertColumnToOID(String table, String id, String column, DataSource dataSource) {

try (Connection connection = dataSource.getConnection()) {
try (ResultSet resultSet = connection.getMetaData().getColumns(null, null, table.toUpperCase(), column.toUpperCase())) {
try (ResultSet resultSet = connection.getMetaData().getColumns(null, null, table.toUpperCase(Locale.ROOT), column.toUpperCase())) {
Copy link
Contributor

@corneil corneil Nov 6, 2024

Choose a reason for hiding this comment

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

You missed the colum.toUpperCase()

@@ -90,7 +91,7 @@ public static void convertColumnToOID(String table, String id, String column, Da

public static void convertColumnFromOID(String table, String id, String column, DataSource dataSource) {
try (Connection connection = dataSource.getConnection()) {
try (ResultSet resultSet = connection.getMetaData().getColumns(null, null, table.toUpperCase(), column.toUpperCase())) {
try (ResultSet resultSet = connection.getMetaData().getColumns(null, null, table.toUpperCase(), column.toUpperCase(Locale.ROOT))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You missed table.toUpperCase()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

WOOT WOOT! Great Catches!

@corneil corneil self-requested a review November 6, 2024 14:55
Copy link
Contributor

@corneil corneil left a comment

Choose a reason for hiding this comment

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

💯

resolves spring-cloud#6048

Signed-off-by: Glenn Renfro <[email protected]>

Update code based on code review

Add to missing Locale.ROOT values to the toUpperCase

Signed-off-by: Glenn Renfro <[email protected]>
@cppwfs cppwfs merged commit 4fb8124 into spring-cloud:main Nov 6, 2024
2 checks passed
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.

Use LocaleRoot when using Strings toLowerCase/toUpperCase
2 participants