@@ -88,65 +88,35 @@ static void autoboxIfNeeded(Class<?> in, Class<?> out, MethodVisitor visitor) {
88
88
89
89
if (in .equals (Boolean .class ) && out .equals (Boolean .TYPE )) {
90
90
visitor .visitMethodInsn (INVOKEVIRTUAL , "java/lang/Boolean" , "booleanValue" , "()Z" , false );
91
- }
92
-
93
- else if (in .equals (Boolean .TYPE ) && out .equals (Boolean .class )) {
91
+ } else if (in .equals (Boolean .TYPE ) && out .equals (Boolean .class )) {
94
92
visitor .visitMethodInsn (INVOKESTATIC , "java/lang/Boolean" , "valueOf" , "(Z)Ljava/lang/Boolean;" , false );
95
- }
96
-
97
- else if (in .equals (Byte .class ) && out .equals (Byte .TYPE )) {
93
+ } else if (in .equals (Byte .class ) && out .equals (Byte .TYPE )) {
98
94
visitor .visitMethodInsn (INVOKEVIRTUAL , "java/lang/Byte" , "byteValue" , "()B" , false );
99
- }
100
-
101
- else if (in .equals (Byte .TYPE ) && out .equals (Byte .class )) {
95
+ } else if (in .equals (Byte .TYPE ) && out .equals (Byte .class )) {
102
96
visitor .visitMethodInsn (INVOKESTATIC , "java/lang/Byte" , "valueOf" , "(B)Ljava/lang/Byte;" , false );
103
- }
104
-
105
- else if (in .equals (Character .class ) && out .equals (Character .TYPE )) {
97
+ } else if (in .equals (Character .class ) && out .equals (Character .TYPE )) {
106
98
visitor .visitMethodInsn (INVOKEVIRTUAL , "java/lang/Character" , "charValue" , "()C" , false );
107
- }
108
-
109
- else if (in .equals (Character .TYPE ) && out .equals (Character .class )) {
99
+ } else if (in .equals (Character .TYPE ) && out .equals (Character .class )) {
110
100
visitor .visitMethodInsn (INVOKESTATIC , "java/lang/Character" , "valueOf" , "(C)Ljava/lang/Character;" , false );
111
- }
112
-
113
- else if (in .equals (Double .class ) && out .equals (Double .TYPE )) {
101
+ } else if (in .equals (Double .class ) && out .equals (Double .TYPE )) {
114
102
visitor .visitMethodInsn (INVOKEVIRTUAL , "java/lang/Double" , "doubleValue" , "()D" , false );
115
- }
116
-
117
- else if (in .equals (Double .TYPE ) && out .equals (Double .class )) {
103
+ } else if (in .equals (Double .TYPE ) && out .equals (Double .class )) {
118
104
visitor .visitMethodInsn (INVOKESTATIC , "java/lang/Double" , "valueOf" , "(D)Ljava/lang/Double;" , false );
119
- }
120
-
121
- else if (in .equals (Float .class ) && out .equals (Float .TYPE )) {
105
+ } else if (in .equals (Float .class ) && out .equals (Float .TYPE )) {
122
106
visitor .visitMethodInsn (INVOKEVIRTUAL , "java/lang/Float" , "floatValue" , "()F" , false );
123
- }
124
-
125
- else if (in .equals (Float .TYPE ) && out .equals (Float .class )) {
107
+ } else if (in .equals (Float .TYPE ) && out .equals (Float .class )) {
126
108
visitor .visitMethodInsn (INVOKESTATIC , "java/lang/Float" , "valueOf" , "(F)Ljava/lang/Float;" , false );
127
- }
128
-
129
- else if (in .equals (Integer .class ) && out .equals (Integer .TYPE )) {
109
+ } else if (in .equals (Integer .class ) && out .equals (Integer .TYPE )) {
130
110
visitor .visitMethodInsn (INVOKEVIRTUAL , "java/lang/Integer" , "intValue" , "()I" , false );
131
- }
132
-
133
- else if (in .equals (Integer .TYPE ) && out .equals (Integer .class )) {
111
+ } else if (in .equals (Integer .TYPE ) && out .equals (Integer .class )) {
134
112
visitor .visitMethodInsn (INVOKESTATIC , "java/lang/Integer" , "valueOf" , "(I)Ljava/lang/Integer;" , false );
135
- }
136
-
137
- else if (in .equals (Long .class ) && out .equals (Long .TYPE )) {
113
+ } else if (in .equals (Long .class ) && out .equals (Long .TYPE )) {
138
114
visitor .visitMethodInsn (INVOKEVIRTUAL , "java/lang/Long" , "longValue" , "()J" , false );
139
- }
140
-
141
- else if (in .equals (Long .TYPE ) && out .equals (Long .class )) {
115
+ } else if (in .equals (Long .TYPE ) && out .equals (Long .class )) {
142
116
visitor .visitMethodInsn (INVOKESTATIC , "java/lang/Long" , "valueOf" , "(J)Ljava/lang/Long;" , false );
143
- }
144
-
145
- else if (in .equals (Short .class ) && out .equals (Short .TYPE )) {
117
+ } else if (in .equals (Short .class ) && out .equals (Short .TYPE )) {
146
118
visitor .visitMethodInsn (INVOKEVIRTUAL , "java/lang/Short" , "shortValue" , "()S" , false );
147
- }
148
-
149
- else if (in .equals (Short .TYPE ) && out .equals (Short .class )) {
119
+ } else if (in .equals (Short .TYPE ) && out .equals (Short .class )) {
150
120
visitor .visitMethodInsn (INVOKESTATIC , "java/lang/Short" , "valueOf" , "(S)Ljava/lang/Short;" , false );
151
121
}
152
122
}
@@ -265,21 +235,13 @@ static void visitDefaultValue(Class<?> parameterType, MethodVisitor mv) {
265
235
266
236
if (parameterType == Integer .TYPE || parameterType == Short .TYPE || parameterType == Boolean .TYPE ) {
267
237
mv .visitInsn (Opcodes .ICONST_0 );
268
- }
269
-
270
- else if (parameterType == Long .TYPE ) {
238
+ } else if (parameterType == Long .TYPE ) {
271
239
mv .visitInsn (Opcodes .LCONST_0 );
272
- }
273
-
274
- else if (parameterType == Double .TYPE ) {
240
+ } else if (parameterType == Double .TYPE ) {
275
241
mv .visitInsn (Opcodes .DCONST_0 );
276
- }
277
-
278
- else if (parameterType == Float .TYPE ) {
242
+ } else if (parameterType == Float .TYPE ) {
279
243
mv .visitInsn (Opcodes .FCONST_0 );
280
- }
281
-
282
- else if (parameterType == Character .TYPE || parameterType == Byte .TYPE ) {
244
+ } else if (parameterType == Character .TYPE || parameterType == Byte .TYPE ) {
283
245
mv .visitIntInsn (Opcodes .BIPUSH , 0 );
284
246
}
285
247
} else {
0 commit comments