mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Make HandlerFunctionDescription JDK 15 compatible
Update `HandlerFunctionDescription` so that it will work with JDK 15. Closes gh-23442
This commit is contained in:
parent
3da300fba9
commit
cc442c5c0d
@ -29,7 +29,13 @@ public class HandlerFunctionDescription {
|
||||
private final String className;
|
||||
|
||||
HandlerFunctionDescription(HandlerFunction<?> handlerFunction) {
|
||||
this.className = handlerFunction.getClass().getCanonicalName();
|
||||
this.className = getHandlerFunctionClassName(handlerFunction);
|
||||
}
|
||||
|
||||
private static String getHandlerFunctionClassName(HandlerFunction<?> handlerFunction) {
|
||||
Class<?> functionClass = handlerFunction.getClass();
|
||||
String canonicalName = functionClass.getCanonicalName();
|
||||
return (canonicalName != null) ? canonicalName : functionClass.getName();
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
|
Loading…
Reference in New Issue
Block a user