GH-9620: Use Locale.ROOT for neutral, case insensitive comparisons

Fixes: #9620
Issue link: https://github.com/spring-projects/spring-integration/issues/9620

**Auto-cherry-pick to `6.3.x` & `6.2.x`**
This commit is contained in:
Artem Bilan
2024-10-31 10:59:05 -04:00
parent ff2b295be8
commit 0d2595ef7c
7 changed files with 66 additions and 58 deletions

View File

@@ -19,6 +19,7 @@ package org.springframework.integration.jdbc.channel;
import java.sql.SQLException;
import java.sql.Statement;
import java.time.Duration;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
@@ -192,7 +193,7 @@ public final class PostgresChannelMessageTableSubscriber implements SmartLifecyc
try {
PgConnection conn = this.connectionSupplier.get();
try (Statement stmt = conn.createStatement()) {
stmt.execute("LISTEN " + this.tablePrefix.toLowerCase() + "channel_message_notify");
stmt.execute("LISTEN " + this.tablePrefix.toLowerCase(Locale.ROOT) + "channel_message_notify");
}
catch (Exception ex) {
try {