Skip to content

Commit 9f9436a

Browse files
committed
Minor clean up
1 parent 7b8009f commit 9f9436a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/main/java/tools/jackson/databind/introspect/POJOPropertiesCollector.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,9 @@ protected Map<String, POJOPropertyBuilder> getPropertyMap() {
348348
*/
349349
public JsonFormat.Value getFormatOverrides() {
350350
if (_formatOverrides == null) {
351-
JsonFormat.Value format = null;
352-
353351
// Let's check both per-type defaults and annotations;
354352
// per-type defaults having higher precedence, so start with annotations
355-
if (_annotationIntrospector != null) {
356-
format = _annotationIntrospector.findFormat(_config, _classDef);
357-
}
353+
JsonFormat.Value format = _annotationIntrospector.findFormat(_config, _classDef);
358354
JsonFormat.Value v = _config.getDefaultPropertyFormat(_type.getRawClass());
359355
if (v != null) {
360356
if (format == null) {
@@ -948,8 +944,7 @@ private boolean _isExplicitlyAnnotatedCreatorPropsBased(PotentialCreator ctor,
948944
}
949945
}
950946
// Second: injectable also suffices
951-
if ((_annotationIntrospector != null)
952-
&& _annotationIntrospector.findInjectableValue(_config, ctor.param(0)) != null) {
947+
if (_annotationIntrospector.findInjectableValue(_config, ctor.param(0)) != null) {
953948
return true;
954949
}
955950
return false;
@@ -1019,8 +1014,7 @@ private boolean _addImplicitConstructor(PotentialCreators collector,
10191014
}
10201015
} else {
10211016
// First things first: if only param has Injectable, must be Props-based
1022-
if ((_annotationIntrospector != null)
1023-
&& _annotationIntrospector.findInjectableValue(_config, ctor.param(0)) != null) {
1017+
if (_annotationIntrospector.findInjectableValue(_config, ctor.param(0)) != null) {
10241018
// props-based, continue
10251019
} else {
10261020
// may have explicit preference

0 commit comments

Comments
 (0)