@@ -34,13 +34,13 @@ public String getStructName() {
3434
3535 @ Override
3636 public JdbcType getRecommendedJdbcType (JdbcTypeIndicators context ) {
37- final BasicType < T > basicType = context .getTypeConfiguration ().getBasicTypeForJavaType ( getJavaType () );
37+ final var basicType = context .getTypeConfiguration ().getBasicTypeForJavaType ( getJavaType () );
3838 if ( basicType != null ) {
3939 return basicType .getJdbcType ();
4040 }
4141 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 );
4444 if ( aggregateDescriptor != null ) {
4545 return aggregateDescriptor ;
4646 }
@@ -49,9 +49,10 @@ public JdbcType getRecommendedJdbcType(JdbcTypeIndicators context) {
4949 }
5050 }
5151 // 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 ) {
5556 final var descriptor = context .getJdbcType ( SqlTypes .SQLXML );
5657 if ( descriptor != null ) {
5758 return descriptor ;
0 commit comments