24
24
import org .hibernate .type .descriptor .jdbc .internal .JdbcTypeBaseline ;
25
25
import org .hibernate .type .spi .TypeConfiguration ;
26
26
27
- import org .jboss .logging .Logger ;
28
-
29
27
import org .checkerframework .checker .nullness .qual .Nullable ;
30
28
31
29
import static org .hibernate .type .descriptor .JdbcTypeNameMapper .isStandardTypeCode ;
40
38
* @since 5.3
41
39
*/
42
40
public class JdbcTypeRegistry implements JdbcTypeBaseline .BaselineTarget , Serializable {
43
- private static final Logger log = Logger .getLogger ( JdbcTypeRegistry .class );
41
+ // private static final Logger log = Logger.getLogger( JdbcTypeRegistry.class );
44
42
45
43
private final TypeConfiguration typeConfiguration ;
46
44
private final ConcurrentHashMap <Integer , JdbcType > descriptorMap = new ConcurrentHashMap <>();
@@ -69,17 +67,17 @@ public TypeConfiguration getTypeConfiguration() {
69
67
@ Override
70
68
public void addDescriptor (JdbcType jdbcType ) {
71
69
final JdbcType previous = descriptorMap .put ( jdbcType .getDefaultSqlTypeCode (), jdbcType );
72
- if ( previous != null && previous != jdbcType ) {
73
- log .tracef ( "addDescriptor(%s) replaced previous registration(%s)" , jdbcType , previous );
74
- }
70
+ // if ( previous != null && previous != jdbcType ) {
71
+ // log.tracef( "addDescriptor(%s) replaced previous registration(%s)", jdbcType, previous );
72
+ // }
75
73
}
76
74
77
75
@ Override
78
76
public void addDescriptor (int typeCode , JdbcType jdbcType ) {
79
77
final JdbcType previous = descriptorMap .put ( typeCode , jdbcType );
80
- if ( previous != null && previous != jdbcType ) {
81
- log .tracef ( "addDescriptor(%d, %s) replaced previous registration(%s)" , typeCode , jdbcType , previous );
82
- }
78
+ // if ( previous != null && previous != jdbcType ) {
79
+ // log.tracef( "addDescriptor(%d, %s) replaced previous registration(%s)", typeCode, jdbcType, previous );
80
+ // }
83
81
}
84
82
85
83
public void addDescriptorIfAbsent (JdbcType jdbcType ) {
@@ -100,10 +98,10 @@ public JdbcType getDescriptor(int jdbcTypeCode) {
100
98
return descriptor ;
101
99
}
102
100
else {
103
- if ( isStandardTypeCode ( jdbcTypeCode ) ) {
104
- log .debugf ( "A standard JDBC type code [%s] was not defined in SqlTypeDescriptorRegistry" ,
105
- jdbcTypeCode );
106
- }
101
+ // if ( isStandardTypeCode( jdbcTypeCode ) ) {
102
+ // log.debugf( "A standard JDBC type code [%s] was not defined in SqlTypeDescriptorRegistry",
103
+ // jdbcTypeCode );
104
+ // }
107
105
108
106
// see if the typecode is part of a known type family...
109
107
final JdbcType potentialAlternateDescriptor = getFamilyDescriptor ( jdbcTypeCode );
@@ -130,10 +128,10 @@ private JdbcType getFamilyDescriptor(int jdbcTypeCode) {
130
128
// todo (6.0) : add a SqlTypeDescriptor#canBeAssignedFrom method ?
131
129
return potentialAlternateDescriptor ;
132
130
}
133
- if ( isStandardTypeCode ( potentialAlternateTypeCode ) ) {
134
- log .debugf ( "A standard JDBC type code [%s] was not defined in SqlTypeDescriptorRegistry" ,
135
- potentialAlternateTypeCode );
136
- }
131
+ // if ( isStandardTypeCode( potentialAlternateTypeCode ) ) {
132
+ // log.debugf( "A standard JDBC type code [%s] was not defined in SqlTypeDescriptorRegistry",
133
+ // potentialAlternateTypeCode );
134
+ // }
137
135
}
138
136
}
139
137
}
0 commit comments