Skip to content

Commit

Permalink
Fix SPI compatibility test for deprecated classes
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed May 31, 2022
1 parent bd0e07a commit 7ebdd44
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ private static void addClassEntities(ImmutableSet.Builder<String> entities, Clas
if (!isPublic(clazz.getModifiers())) {
return;
}
entities.add("Class: " + clazz.toGenericString());
for (Class<?> nestedClass : clazz.getDeclaredClasses()) {
addClassEntities(entities, nestedClass, includeDeprecated);
}
if (!includeDeprecated && clazz.isAnnotationPresent(Deprecated.class)) {
return;
}
entities.add("Class: " + clazz.toGenericString());
for (Constructor<?> constructor : clazz.getConstructors()) {
if (!includeDeprecated && constructor.isAnnotationPresent(Deprecated.class)) {
continue;
Expand Down

0 comments on commit 7ebdd44

Please sign in to comment.