提交 4c7eda8e 编写于 作者: A ascrutae

fix match failed issue

上级 f37a47fe
......@@ -44,7 +44,7 @@ public class ListenableFutureCallbackMatch implements IndirectMatch {
@Override
public ElementMatcher.Junction buildJunction() {
return not(nameStartsWith("org.springframework")).
and(hasSuperType(named(LISTENABLE_FUTURE_CALLBACK_CLASS_NAME)));
and(hasSuperType(named(LISTENABLE_FUTURE_CALLBACK_CLASS_NAME)));
}
@Override
......@@ -53,8 +53,12 @@ public class ListenableFutureCallbackMatch implements IndirectMatch {
for (TypeDescription.Generic generic : typeDescription.getInterfaces()) {
isMatch = isMatch || matchExactClass(generic);
}
return isMatch || matchExactClass(typeDescription.getSuperClass());
if (typeDescription.getSuperClass() != null) {
return isMatch || matchExactClass(typeDescription.getSuperClass());
} else {
return isMatch;
}
}
private boolean matchExactClass(TypeDescription.Generic clazz) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册