File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -197,17 +197,18 @@ public Size apply(
197
197
methodVisitor .visitVarInsn ( Opcodes .ALOAD , 2 );
198
198
methodVisitor .visitLdcInsn ( index ++ );
199
199
methodVisitor .visitInsn ( Opcodes .AALOAD );
200
- if ( setter .getParameterTypes ()[0 ].isPrimitive () ) {
200
+ Class <?> firstParameterType = setter .getParameterTypes ()[0 ];
201
+ if ( firstParameterType .isPrimitive () ) {
201
202
PrimitiveUnboxingDelegate .forReferenceType ( TypeDescription .Generic .OBJECT )
202
203
.assignUnboxedTo (
203
- new TypeDescription .Generic .OfNonGenericType .ForLoadedType ( setter . getParameterTypes ()[ 0 ] ),
204
+ new TypeDescription .Generic .OfNonGenericType .ForLoadedType (firstParameterType ),
204
205
ReferenceTypeAwareAssigner .INSTANCE ,
205
206
Assigner .Typing .DYNAMIC
206
207
)
207
208
.apply ( methodVisitor , implementationContext );
208
209
}
209
210
else {
210
- methodVisitor .visitTypeInsn ( Opcodes .CHECKCAST , Type .getInternalName ( setter . getParameterTypes ()[ 0 ] ) );
211
+ methodVisitor .visitTypeInsn ( Opcodes .CHECKCAST , Type .getInternalName (firstParameterType ) );
211
212
}
212
213
methodVisitor .visitMethodInsn (
213
214
Opcodes .INVOKEVIRTUAL ,
You can’t perform that action at this time.
0 commit comments