private void cleanupKnownCaches() throws Exception { // Whilst not strictly necessary it helps to cleanup soft reference caches // early rather than waiting for memory limits to be reached ResolvableType.clearCache(); cleanCachedIntrospectionResultsCache(); ReflectionUtils.clearCache(); clearAnnotationUtilsCache(); if (!JavaVersion.getJavaVersion().isEqualOrNewerThan(JavaVersion.NINE)) { clear("com.sun.naming.internal.ResourceManager", "propertiesCache"); } }
throws ClassNotFoundException { try { if (name.startsWith("javax.") && JavaVersion.getJavaVersion().isEqualOrNewerThan(JavaVersion.NINE)) { return getClass().getClassLoader().loadClass(name);