26
26
*/
27
27
@ JacksonStdImpl
28
28
public class ObjectArrayDeserializer
29
- extends ContainerDeserializerBase <Object []>
29
+ // Nominal type changes to `java.lang.Object` in 2.17; was `Object[]` before
30
+ extends ContainerDeserializerBase <Object >
30
31
implements ContextualDeserializer
31
32
{
32
33
private static final long serialVersionUID = 1L ;
@@ -189,7 +190,7 @@ public Object getEmptyValue(DeserializationContext ctxt) throws JsonMappingExcep
189
190
*/
190
191
191
192
@ Override
192
- public Object [] deserialize (JsonParser p , DeserializationContext ctxt )
193
+ public Object deserialize (JsonParser p , DeserializationContext ctxt )
193
194
throws IOException
194
195
{
195
196
// Ok: must point to START_ARRAY (or equivalent)
@@ -240,7 +241,7 @@ public Object[] deserialize(JsonParser p, DeserializationContext ctxt)
240
241
}
241
242
242
243
@ Override
243
- public Object [] deserializeWithType (JsonParser p , DeserializationContext ctxt ,
244
+ public Object deserializeWithType (JsonParser p , DeserializationContext ctxt ,
244
245
TypeDeserializer typeDeserializer )
245
246
throws IOException
246
247
{
@@ -250,11 +251,12 @@ public Object[] deserializeWithType(JsonParser p, DeserializationContext ctxt,
250
251
}
251
252
252
253
@ Override // since 2.9
253
- public Object [] deserialize (JsonParser p , DeserializationContext ctxt ,
254
- Object [] intoValue ) throws IOException
254
+ public Object deserialize (JsonParser p , DeserializationContext ctxt ,
255
+ Object intoValue0 ) throws IOException
255
256
{
257
+ final Object [] intoValue = (Object []) intoValue0 ;
256
258
if (!p .isExpectedStartArrayToken ()) {
257
- Object [] arr = handleNonArray (p , ctxt );
259
+ Object [] arr = ( Object []) handleNonArray (p , ctxt );
258
260
if (arr == null ) {
259
261
return intoValue ;
260
262
}
@@ -324,7 +326,7 @@ protected Byte[] deserializeFromBase64(JsonParser p, DeserializationContext ctxt
324
326
return result ;
325
327
}
326
328
327
- protected Object [] handleNonArray (JsonParser p , DeserializationContext ctxt )
329
+ protected Object handleNonArray (JsonParser p , DeserializationContext ctxt )
328
330
throws IOException
329
331
{
330
332
// Can we do implicit coercion to a single-element array still?
@@ -342,7 +344,7 @@ protected Object[] handleNonArray(JsonParser p, DeserializationContext ctxt)
342
344
// Second: empty (and maybe blank) String
343
345
return _deserializeFromString (p , ctxt );
344
346
}
345
- return ( Object []) ctxt .handleUnexpectedToken (_containerType , p );
347
+ return ctxt .handleUnexpectedToken (_containerType , p );
346
348
}
347
349
348
350
Object value ;
0 commit comments