DATACMNS-1779 - Consider kotlin.Unit a simple type.

kotlin.Unit is now considered a simple type to avoid PersistentEntity creation.

ReflectionUtils.isVoid(…) now encapsulates the check so that calling code doesn't need to check if Kotlin is on the class path.
This commit is contained in:
Mark Paluch
2020-07-31 10:49:52 +02:00
parent 837dd0789e
commit bb4d621a32
4 changed files with 36 additions and 3 deletions

View File

@@ -156,7 +156,7 @@ public class SimpleTypeHolder {
String typeName = type.getName();
if (typeName.startsWith("java.lang") || type.getName().startsWith("java.time")) {
if (typeName.startsWith("java.lang") || type.getName().startsWith("java.time") || typeName.equals("kotlin.Unit")) {
return true;
}