@@ -714,7 +714,13 @@ protected Object deserializeWithExternalTypeId(JsonParser p, DeserializationCont
714
714
return deserializeUsingPropertyBasedWithExternalTypeId (p , ctxt );
715
715
}
716
716
if (_delegateDeserializer != null ) {
717
- return deserializeUsingDelegateWithExternalTypeId (p , ctxt );
717
+ /* 24-Nov-2015, tatu: Use of delegating creator needs to have precedence, and basically
718
+ * external type id handling just has to be ignored, as they would relate to target
719
+ * type and not delegate type. Whether this works as expected is another story, but
720
+ * there's no other way to really mix these conflicting features.
721
+ */
722
+ return _valueInstantiator .createUsingDelegate (ctxt ,
723
+ _delegateDeserializer .deserialize (p , ctxt ));
718
724
}
719
725
720
726
return deserializeWithExternalTypeId (p , ctxt , _valueInstantiator .createUsingDefault (ctxt ));
@@ -855,21 +861,4 @@ protected Object deserializeUsingPropertyBasedWithExternalTypeId(JsonParser p, D
855
861
return null ; // never gets here
856
862
}
857
863
}
858
-
859
- /**
860
- * @since 2.7
861
- */
862
- protected Object deserializeUsingDelegateWithExternalTypeId (JsonParser p , DeserializationContext ctxt )
863
- throws IOException
864
- {
865
- // 24-Nov-2015, tatu: Something along these lines would normally work, in absence
866
- // of external type id:
867
- /*
868
- Object delegate = _delegateDeserializer.deserialize(p, ctxt);
869
- return _valueInstantiator.createUsingDelegate(ctxt, delegate);
870
- */
871
-
872
- throw ctxt .instantiationException (handledType (),
873
- "Combination of External Type Id, Delegating Creator not yet supported" );
874
- }
875
864
}
0 commit comments