diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java index 2a5d80c3cb5a..b331de724164 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -258,6 +258,7 @@ public String schemaNameToUse(@Nullable String schemaName) { return identifierNameToUse(schemaName); } + @Nullable private String identifierNameToUse(@Nullable String identifierName) { if (identifierName == null) { return null; @@ -326,8 +327,8 @@ private void locateTableAndProcessMetaData(DatabaseMetaData databaseMetaData, tables = databaseMetaData.getTables( catalogNameToUse(catalogName), schemaNameToUse(schemaName), tableNameToUse(tableName), null); while (tables != null && tables.next()) { - TableMetaData tmd = new TableMetaData(tables.getString("TABLE_CAT"), tables.getString("TABLE_SCHEM"), - tables.getString("TABLE_NAME")); + TableMetaData tmd = new TableMetaData(tables.getString("TABLE_CAT"), + tables.getString("TABLE_SCHEM"), tables.getString("TABLE_NAME")); if (tmd.schemaName() == null) { tableMeta.put(this.userName != null ? this.userName.toUpperCase() : "", tmd); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataContext.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataContext.java index b9c4505eeb7b..447f0b23ab12 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataContext.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataContext.java @@ -425,6 +425,7 @@ public boolean isGeneratedKeysColumnNameArraySupported() { return obtainMetaDataProvider().isGeneratedKeysColumnNameArraySupported(); } + private static final class QuoteHandler { @Nullable @@ -432,7 +433,7 @@ private static final class QuoteHandler { private final boolean quoting; - private QuoteHandler(@Nullable String identifierQuoteString) { + public QuoteHandler(@Nullable String identifierQuoteString) { this.identifierQuoteString = identifierQuoteString; this.quoting = StringUtils.hasText(identifierQuoteString); }