There was an error while loading. Please reload this page.
package java.security; Provider.class private Class getImplClass() throws NoSuchAlgorithmException { try { Reference<Class> ref = classRef; Class clazz = (ref == null) ? null : ref.get(); if (clazz == null) { ClassLoader cl = provider.getClass().getClassLoader(); if (cl == null) { clazz = Class.forName(className); } else { clazz = cl.loadClass(className); } classRef = new WeakReference<Class>(clazz); } return clazz; } catch (ClassNotFoundException e) { throw new NoSuchAlgorithmException ("class configured for " + type + "(provider: " + provider.getName() + ")" + "cannot be found.", e); } }
=>Avoiding problems of default system class loader
private Class getKeyClass(String name) { try { return Class.forName(name); } catch (ClassNotFoundException e) { // ignore } try { ClassLoader cl = provider.getClass().getClassLoader(); if (cl != null) { return cl.loadClass(name); } } catch (ClassNotFoundException e) { // ignore } return null; }