HHH-13544 Restore logged warning on jdbc code mapping issue in NationalizedTypeMappings

This commit is contained in:
Sanne Grinovero 2019-08-06 16:18:21 +01:00 committed by gbadner
parent b37d6938fa
commit 86cd6360b2
1 changed files with 8 additions and 2 deletions

View File

@ -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;
}
}