Merge branch '6.1.x'
# Conflicts: # spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractFallbackJCacheOperationSource.java # spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java # spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package org.springframework.core;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -86,7 +87,10 @@ public final class BridgeMethodResolver {
|
||||
* @see org.springframework.util.ClassUtils#getMostSpecificMethod
|
||||
*/
|
||||
public static Method getMostSpecificMethod(Method bridgeMethod, @Nullable Class<?> targetClass) {
|
||||
if (targetClass != null && !bridgeMethod.getDeclaringClass().isAssignableFrom(targetClass)) {
|
||||
if (targetClass != null &&
|
||||
!ClassUtils.getUserClass(bridgeMethod.getDeclaringClass()).isAssignableFrom(targetClass) &&
|
||||
!Proxy.isProxyClass(bridgeMethod.getDeclaringClass())) {
|
||||
// From a different class hierarchy, and not a JDK or CGLIB proxy either -> return as-is.
|
||||
return bridgeMethod;
|
||||
}
|
||||
|
||||
|
||||
@@ -710,7 +710,7 @@ public class ResolvableType implements Serializable {
|
||||
* @param nestingLevel the required nesting level, indexed from 1 for the
|
||||
* current type, 2 for the first nested generic, 3 for the second and so on
|
||||
* @param typeIndexesPerLevel a map containing the generic index for a given
|
||||
* nesting level (may be {@code null})
|
||||
* nesting level (can be {@code null})
|
||||
* @return a {@code ResolvableType} for the nested level, or {@link #NONE}
|
||||
*/
|
||||
public ResolvableType getNested(int nestingLevel, @Nullable Map<Integer, Integer> typeIndexesPerLevel) {
|
||||
@@ -742,7 +742,7 @@ public class ResolvableType implements Serializable {
|
||||
* generic is returned.
|
||||
* <p>If no generic is available at the specified indexes {@link #NONE} is returned.
|
||||
* @param indexes the indexes that refer to the generic parameter
|
||||
* (may be omitted to return the first generic)
|
||||
* (can be omitted to return the first generic)
|
||||
* @return a {@code ResolvableType} for the specified generic, or {@link #NONE}
|
||||
* @see #hasGenerics()
|
||||
* @see #getGenerics()
|
||||
@@ -845,7 +845,7 @@ public class ResolvableType implements Serializable {
|
||||
* Convenience method that will {@link #getGeneric(int...) get} and
|
||||
* {@link #resolve() resolve} a specific generic parameter.
|
||||
* @param indexes the indexes that refer to the generic parameter
|
||||
* (may be omitted to return the first generic)
|
||||
* (can be omitted to return the first generic)
|
||||
* @return a resolved {@link Class} or {@code null}
|
||||
* @see #getGeneric(int...)
|
||||
* @see #resolve()
|
||||
|
||||
Reference in New Issue
Block a user