changeset 750:c171b34ce2ae

Ensure readable after merge
author mchung
date Fri, 11 Dec 2015 00:07:31 -0800
parents fe38ca1dc4a9
children bb6d39011cba
files src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java src/java.xml.ws/share/classes/javax/xml/soap/ServiceLoaderUtil.java
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java	Thu Dec 10 15:45:58 2015 -0800
+++ b/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java	Fri Dec 11 00:07:31 2015 -0800
@@ -33,7 +33,6 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Properties;
-import com.sun.xml.internal.ws.Modules;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
--- a/src/java.xml.ws/share/classes/javax/xml/soap/ServiceLoaderUtil.java	Thu Dec 10 15:45:58 2015 -0800
+++ b/src/java.xml.ws/share/classes/javax/xml/soap/ServiceLoaderUtil.java	Fri Dec 11 00:07:31 2015 -0800
@@ -25,6 +25,7 @@
 
 package javax.xml.soap;
 
+import com.sun.xml.internal.ws.Modules;
 import java.util.ServiceLoader;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -83,7 +84,9 @@
                                                     String defaultImplClassName, ClassLoader classLoader,
                                                     final ExceptionHandler<T> handler) throws T {
         try {
-            return safeLoadClass(className, defaultImplClassName, classLoader).newInstance();
+            Class spiClass = safeLoadClass(className, defaultImplClassName, classLoader);
+            Modules.ensureReadable(ServiceLoaderUtil.class, spiClass);
+            return spiClass.newInstance();
         } catch (ClassNotFoundException x) {
             throw handler.createException(x, "Provider " + className + " not found");
         } catch (Exception x) {