I am running sonar cloud through my Java code and it has some deprecated constructors. I managed to update most of them, but not this one:
import org.reflections.util.ClasspathHelper;
private static final String PACKAGE_ENTITIES = "my.package";
new Reflections(PACKAGE_ENTITIES, new SubTypesScanner(false), ClasspathHelper.forClassLoader());
'org.reflections.scanners.SubTypesScanner' is deprecated is the official sonar message.
My guess is Scanners.SubTypes (s -> true)
Any tips?
Thanks in advance.
Check the documentation of the
SubTypesScannerclass:So the solution is to use the
Scanners.SubTypesfield instead.