MethodIntrospector handles overriding bridge method correctly
Closes gh-30906
(cherry picked from commit 616f728afa)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -74,7 +74,8 @@ public final class MethodIntrospector {
|
||||
T result = metadataLookup.inspect(specificMethod);
|
||||
if (result != null) {
|
||||
Method bridgedMethod = BridgeMethodResolver.findBridgedMethod(specificMethod);
|
||||
if (bridgedMethod == specificMethod || metadataLookup.inspect(bridgedMethod) == null) {
|
||||
if (bridgedMethod == specificMethod || bridgedMethod == method ||
|
||||
metadataLookup.inspect(bridgedMethod) == null) {
|
||||
methodMap.put(specificMethod, result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user