Skip to content

Commit

Permalink
Remove LocalVariableTableParameterNameDiscoverer
Browse files Browse the repository at this point in the history
Closes gh-29559
  • Loading branch information
jhoeller committed Apr 30, 2023
1 parent 9342317 commit 4d15b58
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 622 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 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.
Expand All @@ -18,8 +18,7 @@

/**
* Default implementation of the {@link ParameterNameDiscoverer} strategy interface,
* delegating to the Java 8 standard reflection mechanism, with a deprecated fallback
* to {@link LocalVariableTableParameterNameDiscoverer}.
* delegating to the Java 8 standard reflection mechanism.
*
* <p>If a Kotlin reflection implementation is present,
* {@link KotlinReflectionParameterNameDiscoverer} is added first in the list and
Expand All @@ -36,20 +35,13 @@
*/
public class DefaultParameterNameDiscoverer extends PrioritizedParameterNameDiscoverer {

@SuppressWarnings("removal")
public DefaultParameterNameDiscoverer() {
if (KotlinDetector.isKotlinReflectPresent()) {
addDiscoverer(new KotlinReflectionParameterNameDiscoverer());
}

// Recommended approach on Java 8+: compilation with -parameters.
addDiscoverer(new StandardReflectionParameterNameDiscoverer());

// Deprecated fallback to class file parsing for -debug symbols.
// Does not work on native images without class file resources.
if (!NativeDetector.inNativeImage()) {
addDiscoverer(new LocalVariableTableParameterNameDiscoverer());
}
}

}

This file was deleted.

0 comments on commit 4d15b58

Please sign in to comment.