Remove outdated NativeDetector check for Kotlin reflection
See gh-25179
This commit is contained in:
parent
639c047f2f
commit
c4e8ffece1
|
@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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 class DefaultParameterNameDiscoverer extends PrioritizedParameterNameDiscoverer {
|
||||||
|
|
||||||
public DefaultParameterNameDiscoverer() {
|
public DefaultParameterNameDiscoverer() {
|
||||||
// TODO Remove this conditional inclusion when upgrading to Kotlin 1.5, see https://youtrack.jetbrains.com/issue/KT-44594
|
if (KotlinDetector.isKotlinReflectPresent()) {
|
||||||
if (KotlinDetector.isKotlinReflectPresent() && !NativeDetector.inNativeImage()) {
|
|
||||||
addDiscoverer(new KotlinReflectionParameterNameDiscoverer());
|
addDiscoverer(new KotlinReflectionParameterNameDiscoverer());
|
||||||
}
|
}
|
||||||
addDiscoverer(new StandardReflectionParameterNameDiscoverer());
|
addDiscoverer(new StandardReflectionParameterNameDiscoverer());
|
||||||
|
|
Loading…
Reference in New Issue