|
4 | 4 | */ |
5 | 5 | package org.hibernate.procedure.internal; |
6 | 6 |
|
7 | | -import java.util.List; |
8 | | - |
9 | 7 | import org.hibernate.QueryException; |
10 | 8 | import org.hibernate.dialect.Dialect; |
11 | 9 | import org.hibernate.engine.spi.SharedSessionContractImplementor; |
@@ -49,16 +47,13 @@ public JdbcOperationQueryCall interpretCall(ProcedureCallImplementor<?> procedur |
49 | 47 | final FunctionReturnImplementor<?> functionReturn = procedureCall.getFunctionReturn(); |
50 | 48 | final ProcedureParameterMetadataImplementor parameterMetadata = procedureCall.getParameterMetadata(); |
51 | 49 | final SharedSessionContractImplementor session = procedureCall.getSession(); |
52 | | - final List<? extends ProcedureParameterImplementor<?>> registrations = parameterMetadata.getRegistrationsAsList(); |
53 | | - final int paramStringSizeEstimate; |
54 | | - if ( functionReturn == null && parameterMetadata.hasNamedParameters() ) { |
55 | | - // That's just a rough estimate. I guess most params will have fewer than 8 chars on average |
56 | | - paramStringSizeEstimate = registrations.size() * 10; |
57 | | - } |
58 | | - else { |
59 | | - // For every param rendered as '?' we have a comma, hence the estimate |
60 | | - paramStringSizeEstimate = registrations.size() * 2; |
61 | | - } |
| 50 | + final var registrations = parameterMetadata.getRegistrationsAsList(); |
| 51 | + final int paramStringSizeEstimate = |
| 52 | + functionReturn == null && parameterMetadata.hasNamedParameters() |
| 53 | + // That's just a rough estimate. I guess most params will have fewer than 8 chars on average |
| 54 | + ? registrations.size() * 10 |
| 55 | + // For every param rendered as '?' we have a comma, hence the estimate |
| 56 | + : registrations.size() * 2; |
62 | 57 | final JdbcCallImpl.Builder builder = new JdbcCallImpl.Builder(); |
63 | 58 | final StringBuilder buffer; |
64 | 59 | final int offset; |
@@ -110,7 +105,7 @@ public JdbcOperationQueryCall interpretCall(ProcedureCallImplementor<?> procedur |
110 | 105 |
|
111 | 106 | protected void appendNameParameter( |
112 | 107 | StringBuilder buffer, |
113 | | - ProcedureParameterImplementor parameter, |
| 108 | + ProcedureParameterImplementor<?> parameter, |
114 | 109 | JdbcCallParameterRegistration registration) { |
115 | 110 | buffer.append( '?' ); |
116 | 111 | } |
|
0 commit comments