Fix constructor resolution for Kotlin classes using unsigned types.

We now leniently skip parameter name resolution for types using unsigned types. The issue is caused by Kotlin's DefaultConstructorMarker that doesn't report a parameter name.

Closes #2215
This commit is contained in:
Mark Paluch
2021-01-18 13:46:31 +01:00
parent 2473a21fed
commit 07dad67c38
2 changed files with 33 additions and 5 deletions

View File

@@ -212,7 +212,7 @@ public interface PreferredConstructorDiscoverer<T, P extends PersistentProperty<
for (int i = 0; i < parameterTypes.size(); i++) {
String name = parameterNames == null ? null : parameterNames[i];
String name = parameterNames == null || parameterNames.length <= i ? null : parameterNames[i];
TypeInformation<?> type = parameterTypes.get(i);
Annotation[] annotations = parameterAnnotations[i];