I am trying to preload (force load) of classes from predefined package set. And got situation when classes from rt.jar aren't loaded by reflections.
For test purposes I cut my reflections configuration to attempt to load only one JDK class:
ConfigurationBuilder cb = new ConfigurationBuilder()
.setScanners(new SubTypesScanner(false))
.useParallelExecutor();
cb.addUrls(ClasspathHelper.forClass(DoubleSignature.class));
Reflections reflections = new Reflections(cb);
Set<Class<? extends DoubleSignature>> classesToLoad = reflections.getSubTypesOf(DoubleSignature.class);
Assert.assertTrue(classesToLoad.contains(DoubleSignature.class)); // -> throw java.lang.AssertionError here
And it doesn't load DoubleSignature. Is it reflections bug? Or am I doing something wrong?