diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java index cabe6d27c2..5a46e8d08a 100644 --- a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java +++ b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java @@ -268,10 +268,7 @@ public abstract class BeanUtils { public static Constructor findPrimaryConstructor(Class clazz) { Assert.notNull(clazz, "Class must not be null"); if (KotlinDetector.isKotlinReflectPresent() && KotlinDetector.isKotlinType(clazz)) { - Constructor kotlinPrimaryConstructor = KotlinDelegate.findPrimaryConstructor(clazz); - if (kotlinPrimaryConstructor != null) { - return kotlinPrimaryConstructor; - } + return KotlinDelegate.findPrimaryConstructor(clazz); } return null; }