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(
197197 methodVisitor .visitVarInsn ( Opcodes .ALOAD , 2 );
198198 methodVisitor .visitLdcInsn ( index ++ );
199199 methodVisitor .visitInsn ( Opcodes .AALOAD );
200- if ( setter .getParameterTypes ()[0 ].isPrimitive () ) {
200+ Class <?> firstParameterType = setter .getParameterTypes ()[0 ];
201+ if ( firstParameterType .isPrimitive () ) {
201202 PrimitiveUnboxingDelegate .forReferenceType ( TypeDescription .Generic .OBJECT )
202203 .assignUnboxedTo (
203- new TypeDescription .Generic .OfNonGenericType .ForLoadedType ( setter . getParameterTypes ()[ 0 ] ),
204+ new TypeDescription .Generic .OfNonGenericType .ForLoadedType (firstParameterType ),
204205 ReferenceTypeAwareAssigner .INSTANCE ,
205206 Assigner .Typing .DYNAMIC
206207 )
207208 .apply ( methodVisitor , implementationContext );
208209 }
209210 else {
210- methodVisitor .visitTypeInsn ( Opcodes .CHECKCAST , Type .getInternalName ( setter . getParameterTypes ()[ 0 ] ) );
211+ methodVisitor .visitTypeInsn ( Opcodes .CHECKCAST , Type .getInternalName (firstParameterType ) );
211212 }
212213 methodVisitor .visitMethodInsn (
213214 Opcodes .INVOKEVIRTUAL ,
You can’t perform that action at this time.
0 commit comments