Skip to content

Commit

Permalink
Avoid ResolvableType creation for interface/superclass check
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Jun 21, 2023
1 parent dc2f513 commit 1dfe737
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -567,7 +567,7 @@ private boolean determineUnresolvableGenerics() {
try {
for (Type genericInterface : resolved.getGenericInterfaces()) {
if (genericInterface instanceof Class<?> clazz) {
if (forClass(clazz).hasGenerics()) {
if (clazz.getTypeParameters().length > 0) {
return true;
}
}
Expand All @@ -576,7 +576,10 @@ private boolean determineUnresolvableGenerics() {
catch (TypeNotPresentException ex) {
// Ignore non-present types in generic signature
}
return getSuperType().hasUnresolvableGenerics();
Class<?> superclass = resolved.getSuperclass();
if (superclass != null && superclass != Object.class) {
return getSuperType().hasUnresolvableGenerics();
}
}
return false;
}
Expand Down

0 comments on commit 1dfe737

Please sign in to comment.