From 3a7a85b645ee7442397ffc34cd0e05b64723f5e7 Mon Sep 17 00:00:00 2001 From: Nathan Xu Date: Mon, 24 Mar 2025 19:44:13 -0400 Subject: [PATCH] avoid duplicated SqlAstTranslatorFactory creation in JdbcEnvironmentImpl --- .../engine/jdbc/env/internal/JdbcEnvironmentImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/env/internal/JdbcEnvironmentImpl.java b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/env/internal/JdbcEnvironmentImpl.java index bc8314bbea37..4d64be518361 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/env/internal/JdbcEnvironmentImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/env/internal/JdbcEnvironmentImpl.java @@ -135,8 +135,9 @@ private static IdentifierHelper identifierHelper( } private static SqlAstTranslatorFactory resolveSqlAstTranslatorFactory(Dialect dialect) { - return dialect.getSqlAstTranslatorFactory() != null - ? dialect.getSqlAstTranslatorFactory() + final SqlAstTranslatorFactory sqlAstTranslatorFactory = dialect.getSqlAstTranslatorFactory(); + return sqlAstTranslatorFactory != null + ? sqlAstTranslatorFactory : new StandardSqlAstTranslatorFactory(); }