@@ -213,26 +213,13 @@ protected BeanDeserializerBase(BeanDeserializerBuilder builder,
213
213
: injectables .toArray (new ValueInjector [injectables .size ()]);
214
214
_objectIdReader = builder .getObjectIdReader ();
215
215
216
- // If you check for canCreateFromInt() below which appears to be the equivalent
217
- // of the existing canCreateUsingArrayDelegate() it also causes the included
218
- // test testPOJOWithPrimitiveCreatorFromObjectRepresentation() to break in the
219
- // same way as the test testPOJOWithArrayCreatorFromObjectRepresentation() which
220
- // I assert is failing because of the call to canCreateUsingArrayDelegate() below.
221
- //
222
- // Removing the call to canCreateUsingArrayDelegate() below allows the test
223
- // testPOJOWithArrayCreatorFromObjectRepresentation() to pass and interestingly
224
- // all existing tests continue to pass. I somehow doubt that it's that simple.
225
- //
226
- // Specifically, it seems to me that the vanilla-ness of the deserialization can
227
- // only be determined once the structure of the incoming JSON can be compared to
228
- // what creator methods exist. For example, if there is an array delegate and we
229
- // are asked to deserialize from an array then it's not vanilla. However, if we
230
- // are asked to deserialize from an object then it's vanilla (subject to no other
231
- // non-vanilla-ness being present).
216
+ // 02-May-2020, tatu (from @vjkoskela's comment): [databind#2486] is due to
217
+ // determination that existence of array-delegate alone means that use of
218
+ // "default creator + POJO" -- is not available. But this is not actually
219
+ // known before seeing Array value (unlike with more general "any" delegate).
232
220
_nonStandardCreation = (_unwrappedPropertyHandler != null )
233
- //|| _valueInstantiator.canCreateFromInt()
234
221
|| _valueInstantiator .canCreateUsingDelegate ()
235
- || _valueInstantiator .canCreateUsingArrayDelegate () // new in 2.7
222
+ || _valueInstantiator .canCreateUsingArrayDelegate ()
236
223
|| _valueInstantiator .canCreateFromObjectWith ()
237
224
|| !_valueInstantiator .canCreateUsingDefault ()
238
225
;
0 commit comments