Skip to content

Commit 3bc9a0a

Browse files
committed
Tiny cleanup to eliminate bit of dead code
1 parent 35707e5 commit 3bc9a0a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,7 @@ protected Object _deserializeUsingPropertyBased(final JsonParser p, final Deseri
525525
try {
526526
bean = creator.build(ctxt, buffer);
527527
} catch (Exception e) {
528-
wrapInstantiationProblem(e, ctxt);
529-
bean = null; // never gets here
528+
return wrapInstantiationProblem(e, ctxt);
530529
}
531530
// 13-Apr-2020, tatu: [databind#2678] need to handle injection here
532531
if (_injectables != null) {
@@ -881,9 +880,8 @@ protected Object deserializeUsingPropertyBasedWithUnwrapped(JsonParser p, Deseri
881880
if (bean.getClass() != _beanType.getRawClass()) {
882881
// !!! 08-Jul-2011, tatu: Could probably support; but for now
883882
// it's too complicated, so bail out
884-
ctxt.reportInputMismatch(creatorProp,
883+
return ctxt.reportInputMismatch(creatorProp,
885884
"Cannot create polymorphic instances with unwrapped values");
886-
return null;
887885
}
888886
return _unwrappedPropertyHandler.processUnwrapped(p, ctxt, bean, tokens);
889887
}
@@ -928,8 +926,7 @@ protected Object deserializeUsingPropertyBasedWithUnwrapped(JsonParser p, Deseri
928926
try {
929927
bean = creator.build(ctxt, buffer);
930928
} catch (Exception e) {
931-
wrapInstantiationProblem(e, ctxt);
932-
return null; // never gets here
929+
return wrapInstantiationProblem(e, ctxt);
933930
}
934931
return _unwrappedPropertyHandler.processUnwrapped(p, ctxt, bean, tokens);
935932
}

0 commit comments

Comments
 (0)