Skip to content

Commit b6af5aa

Browse files
authored
Try to fix issue wrt parameter names, master (#4548)
1 parent 9147dba commit b6af5aa

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/com/fasterxml/jackson/databind/introspect/POJOPropertiesCollector.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -869,10 +869,13 @@ private boolean _isExplicitlyAnnotatedCreatorPropsBased(PotentialCreator ctor,
869869
}
870870
if (ctor.paramCount() == 1) {
871871
// One more possibility: implicit name that maps to implied
872-
// property based on Field/Getter/Setter
872+
// property with at least one visible accessor
873873
String implName = ctor.implicitNameSimple(0);
874-
if ((implName != null) && props.containsKey(implName)) {
875-
return true;
874+
if (implName != null) {
875+
POJOPropertyBuilder prop = props.get(implName);
876+
if ((prop != null) && prop.anyVisible() && !prop.anyIgnorals()) {
877+
return true;
878+
}
876879
}
877880
// Second: injectable also suffices
878881
if ((_annotationIntrospector != null)

0 commit comments

Comments
 (0)