Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.util.Set;
import java.util.stream.Stream;

import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static com.google.common.collect.Sets.difference;
import static java.lang.ClassLoader.getPlatformClassLoader;
import static java.lang.ClassLoader.getSystemClassLoader;
Expand Down Expand Up @@ -110,7 +111,11 @@ private static Set<String> getSpiEntities(ClassLoader classLoader, boolean inclu
Class<?> clazz = classInfo.load();
addClassEntities(entities, clazz, includeDeprecated);
}
return entities.build();
return entities.build().stream()
// Ignore `final` so that we can e.g. remove final from a SPI method.
// While adding `final` can be a breaking change, we currently ignore such breakages.
.map(entity -> entity.replace(" final ", " "))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wisdom from @lukasz-stec 's #12053 (comment)
and indicate it's a conscious choice

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment.

.collect(toImmutableSet());
}

private static void addClassEntities(ImmutableSet.Builder<String> entities, Class<?> clazz, boolean includeDeprecated)
Expand Down