Skip to content

Commit

Permalink
HHH-13544 Restore logged warning on jdbc code mapping issue in Nation…
Browse files Browse the repository at this point in the history
…alizedTypeMappings
  • Loading branch information
Sanne authored and gbadner committed Aug 7, 2019
1 parent b37d693 commit 86cd636
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -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.
Expand All @@ -20,6 +21,8 @@
*/
public final class NationalizedTypeMappings {

private static final Logger log = Logger.getLogger( NationalizedTypeMappings.class );

/**
* Singleton access
* @deprecated use the static methods instead
Expand All @@ -37,7 +40,10 @@ public static int toNationalizedTypeCode(final int jdbcCode) {
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;
}
}

Expand Down

0 comments on commit 86cd636

Please sign in to comment.