|
@@ -44,19 +44,19 @@ public abstract class CachedDataSourceSwitchStrategyMatcher implements DataSourc
|
|
|
@AllArgsConstructor
|
|
|
public static class CacheKey {
|
|
|
|
|
|
- private Class target;
|
|
|
+ private Class<?> target;
|
|
|
|
|
|
private Method method;
|
|
|
|
|
|
@Override
|
|
|
- public boolean equals(Object obj) {
|
|
|
- if (!(obj instanceof CacheKey)) {
|
|
|
+ public boolean equals(Object targetObject) {
|
|
|
+ if (!(targetObject instanceof CacheKey)) {
|
|
|
return false;
|
|
|
}
|
|
|
- CacheKey target = ((CacheKey) obj);
|
|
|
- return target.target.getName().equals(this.target.getName())
|
|
|
- && target.method.getName().equals(method.getName())
|
|
|
- && target.method.getParameterCount() == method.getParameterCount();
|
|
|
+ CacheKey targetCacheKey = ((CacheKey) targetObject);
|
|
|
+ return targetCacheKey.target.isAssignableFrom(this.target)
|
|
|
+ && targetCacheKey.method.getName().equals(method.getName())
|
|
|
+ && targetCacheKey.method.getParameterCount() == method.getParameterCount();
|
|
|
}
|
|
|
|
|
|
public int hashCode() {
|