Polishing

This commit is contained in:
Juergen Hoeller 2024-01-29 13:04:42 +01:00
parent 7e5efdd8dd
commit 2e9d6a1d4e
2 changed files with 6 additions and 4 deletions

View File

@ -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 class GenericTableMetaDataProvider implements TableMetaDataProvider {
return identifierNameToUse(schemaName);
}
@Nullable
private String identifierNameToUse(@Nullable String identifierName) {
if (identifierName == null) {
return null;
@ -326,8 +327,8 @@ public class GenericTableMetaDataProvider implements TableMetaDataProvider {
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);
}

View File

@ -425,6 +425,7 @@ public class TableMetaDataContext {
return obtainMetaDataProvider().isGeneratedKeysColumnNameArraySupported();
}
private static final class QuoteHandler {
@Nullable
@ -432,7 +433,7 @@ public class TableMetaDataContext {
private final boolean quoting;
private QuoteHandler(@Nullable String identifierQuoteString) {
public QuoteHandler(@Nullable String identifierQuoteString) {
this.identifierQuoteString = identifierQuoteString;
this.quoting = StringUtils.hasText(identifierQuoteString);
}