@@ -525,8 +525,7 @@ protected Object _deserializeUsingPropertyBased(final JsonParser p, final Deseri
525
525
try {
526
526
bean = creator .build (ctxt , buffer );
527
527
} catch (Exception e ) {
528
- wrapInstantiationProblem (e , ctxt );
529
- bean = null ; // never gets here
528
+ return wrapInstantiationProblem (e , ctxt );
530
529
}
531
530
// 13-Apr-2020, tatu: [databind#2678] need to handle injection here
532
531
if (_injectables != null ) {
@@ -881,9 +880,8 @@ protected Object deserializeUsingPropertyBasedWithUnwrapped(JsonParser p, Deseri
881
880
if (bean .getClass () != _beanType .getRawClass ()) {
882
881
// !!! 08-Jul-2011, tatu: Could probably support; but for now
883
882
// it's too complicated, so bail out
884
- ctxt .reportInputMismatch (creatorProp ,
883
+ return ctxt .reportInputMismatch (creatorProp ,
885
884
"Cannot create polymorphic instances with unwrapped values" );
886
- return null ;
887
885
}
888
886
return _unwrappedPropertyHandler .processUnwrapped (p , ctxt , bean , tokens );
889
887
}
@@ -928,8 +926,7 @@ protected Object deserializeUsingPropertyBasedWithUnwrapped(JsonParser p, Deseri
928
926
try {
929
927
bean = creator .build (ctxt , buffer );
930
928
} catch (Exception e ) {
931
- wrapInstantiationProblem (e , ctxt );
932
- return null ; // never gets here
929
+ return wrapInstantiationProblem (e , ctxt );
933
930
}
934
931
return _unwrappedPropertyHandler .processUnwrapped (p , ctxt , bean , tokens );
935
932
}
0 commit comments