Skip to content

Commit dd8d755

Browse files
authored
Remove java8 API invocation from AnnotatedConstructor (#2918)
1 parent 4b79211 commit dd8d755

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ public Object getValue(Object pojo)
165165

166166
@Override
167167
public String toString() {
168-
final int argCount = _constructor.getParameterCount();
168+
// 03-Nov-2020 ckozak: This can use _constructor.getParameterCount() once java 8 is required.
169+
final int argCount = _constructor.getParameterTypes().length;
169170
return String.format("[constructor for %s (%d arg%s), annotations: %s",
170171
ClassUtil.nameOf(_constructor.getDeclaringClass()), argCount,
171172
(argCount == 1) ? "" : "s", _annotations);

0 commit comments

Comments
 (0)