From 7cb828f4e72d02d82704744c6be2fab2f3675d59 Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Tue, 6 Aug 2019 16:18:21 +0100 Subject: [PATCH] HHH-13544 Restore logged warning on jdbc code mapping issue in NationalizedTypeMappings --- .../type/descriptor/sql/NationalizedTypeMappings.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/type/descriptor/sql/NationalizedTypeMappings.java b/hibernate-core/src/main/java/org/hibernate/type/descriptor/sql/NationalizedTypeMappings.java index 1d47e4534f..9dd7c21ffa 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/descriptor/sql/NationalizedTypeMappings.java +++ b/hibernate-core/src/main/java/org/hibernate/type/descriptor/sql/NationalizedTypeMappings.java @@ -7,7 +7,8 @@ package org.hibernate.type.descriptor.sql; import java.sql.Types; -import java.util.Map; + +import org.jboss.logging.Logger; /** * Manages a mapping between nationalized and non-nationalized variants of JDBC types. @@ -20,6 +21,8 @@ import java.util.Map; */ public final class NationalizedTypeMappings { + private static final Logger log = Logger.getLogger( NationalizedTypeMappings.class ); + /** * Singleton access * @deprecated use the static methods instead @@ -37,7 +40,10 @@ public final class NationalizedTypeMappings { case Types.LONGVARCHAR: return Types.LONGNVARCHAR; case Types.VARCHAR: return Types.NVARCHAR; default: - throw new IllegalArgumentException( "Unable to locate nationalized jdbc-code equivalent for given jdbc code : " + jdbcCode ); + if ( log.isDebugEnabled() ) { + log.debug( "Unable to locate nationalized jdbc-code equivalent for given jdbc code : " + jdbcCode ); + } + return jdbcCode; } }