From c4e8ffece16db679ef4d92d97d7b3e8c748f0b5a Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 14 Jun 2022 14:02:41 +0200 Subject: [PATCH] Remove outdated NativeDetector check for Kotlin reflection See gh-25179 --- .../springframework/core/DefaultParameterNameDiscoverer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/DefaultParameterNameDiscoverer.java b/spring-core/src/main/java/org/springframework/core/DefaultParameterNameDiscoverer.java index f4dca0f996..746599542c 100644 --- a/spring-core/src/main/java/org/springframework/core/DefaultParameterNameDiscoverer.java +++ b/spring-core/src/main/java/org/springframework/core/DefaultParameterNameDiscoverer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,8 +40,7 @@ package org.springframework.core; public class DefaultParameterNameDiscoverer extends PrioritizedParameterNameDiscoverer { public DefaultParameterNameDiscoverer() { - // TODO Remove this conditional inclusion when upgrading to Kotlin 1.5, see https://youtrack.jetbrains.com/issue/KT-44594 - if (KotlinDetector.isKotlinReflectPresent() && !NativeDetector.inNativeImage()) { + if (KotlinDetector.isKotlinReflectPresent()) { addDiscoverer(new KotlinReflectionParameterNameDiscoverer()); } addDiscoverer(new StandardReflectionParameterNameDiscoverer());