diff -r aa0a2d22981d -r bfa06be36a17 jaxp/src/java.xml/share/classes/org/w3c/dom/bootstrap/DOMImplementationRegistry.java --- a/jaxp/src/java.xml/share/classes/org/w3c/dom/bootstrap/DOMImplementationRegistry.java Fri Jul 07 03:13:49 2017 +0000 +++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/bootstrap/DOMImplementationRegistry.java Mon Jul 10 10:22:36 2017 -0700 @@ -50,6 +50,7 @@ import java.io.InputStream; import java.io.BufferedReader; import java.io.InputStreamReader; +import java.lang.reflect.InvocationTargetException; import java.security.AccessController; import java.security.PrivilegedAction; @@ -183,9 +184,13 @@ } else { sourceClass = Class.forName(sourceName); } - DOMImplementationSource source = - (DOMImplementationSource) sourceClass.newInstance(); - sources.addElement(source); + try { + DOMImplementationSource source = + (DOMImplementationSource) sourceClass.getConstructor().newInstance(); + sources.addElement(source); + } catch (NoSuchMethodException | InvocationTargetException e) { + throw new InstantiationException(e.getMessage()); + } } } return new DOMImplementationRegistry(sources);