@@ -34,13 +34,13 @@ public String getStructName() {
34
34
35
35
@ Override
36
36
public JdbcType getRecommendedJdbcType (JdbcTypeIndicators context ) {
37
- final BasicType < T > basicType = context .getTypeConfiguration ().getBasicTypeForJavaType ( getJavaType () );
37
+ final var basicType = context .getTypeConfiguration ().getBasicTypeForJavaType ( getJavaType () );
38
38
if ( basicType != null ) {
39
39
return basicType .getJdbcType ();
40
40
}
41
41
if ( structName != null ) {
42
- final JdbcTypeRegistry jdbcTypeRegistry = context .getTypeConfiguration ().getJdbcTypeRegistry ();
43
- final AggregateJdbcType aggregateDescriptor = jdbcTypeRegistry .findAggregateDescriptor ( structName );
42
+ final var jdbcTypeRegistry = context .getTypeConfiguration ().getJdbcTypeRegistry ();
43
+ final var aggregateDescriptor = jdbcTypeRegistry .findAggregateDescriptor ( structName );
44
44
if ( aggregateDescriptor != null ) {
45
45
return aggregateDescriptor ;
46
46
}
@@ -49,9 +49,10 @@ public JdbcType getRecommendedJdbcType(JdbcTypeIndicators context) {
49
49
}
50
50
}
51
51
// When the column is mapped as XML array, the component type must be SQLXML
52
- if ( context .getExplicitJdbcTypeCode () != null && context .getExplicitJdbcTypeCode () == SqlTypes .XML_ARRAY
53
- // Also prefer XML is the Dialect prefers XML arrays
54
- || context .getDialect ().getPreferredSqlTypeCodeForArray () == SqlTypes .XML_ARRAY ) {
52
+ final Integer explicitJdbcTypeCode = context .getExplicitJdbcTypeCode ();
53
+ if ( explicitJdbcTypeCode != null && explicitJdbcTypeCode == SqlTypes .XML_ARRAY
54
+ // Also prefer XML as the Dialect prefers XML arrays
55
+ || context .getDialect ().getPreferredSqlTypeCodeForArray () == SqlTypes .XML_ARRAY ) {
55
56
final var descriptor = context .getJdbcType ( SqlTypes .SQLXML );
56
57
if ( descriptor != null ) {
57
58
return descriptor ;
0 commit comments