diff --git a/core/trino-spi/src/test/java/io/trino/spi/TestSpiBackwardCompatibility.java b/core/trino-spi/src/test/java/io/trino/spi/TestSpiBackwardCompatibility.java index d940dd4a778e..1e1c25d95f7a 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/TestSpiBackwardCompatibility.java +++ b/core/trino-spi/src/test/java/io/trino/spi/TestSpiBackwardCompatibility.java @@ -135,13 +135,13 @@ private static void addClassEntities(ImmutableSet.Builder 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;