Skip to content

Commit 275275a

Browse files
committed
minor comment change
1 parent cc42ced commit 275275a

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -213,26 +213,13 @@ protected BeanDeserializerBase(BeanDeserializerBuilder builder,
213213
: injectables.toArray(new ValueInjector[injectables.size()]);
214214
_objectIdReader = builder.getObjectIdReader();
215215

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).
232220
_nonStandardCreation = (_unwrappedPropertyHandler != null)
233-
//|| _valueInstantiator.canCreateFromInt()
234221
|| _valueInstantiator.canCreateUsingDelegate()
235-
|| _valueInstantiator.canCreateUsingArrayDelegate() // new in 2.7
222+
|| _valueInstantiator.canCreateUsingArrayDelegate()
236223
|| _valueInstantiator.canCreateFromObjectWith()
237224
|| !_valueInstantiator.canCreateUsingDefault()
238225
;

0 commit comments

Comments
 (0)