changeset 780:e4cd98db3249

8177530: Module system implementation refresh (4/2017) Reviewed-by: mchung
author alanb
date Fri, 07 Apr 2017 08:05:45 +0000
parents b92bbd3a5613
children a987401bac0d
files src/java.xml.ws/share/classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java
diffstat 3 files changed, 13 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java	Thu Apr 06 17:01:03 2017 +0000
+++ b/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java	Fri Apr 07 08:05:45 2017 +0000
@@ -26,6 +26,7 @@
 package com.sun.xml.internal.ws.addressing;
 
 import com.sun.xml.internal.ws.api.server.*;
+import com.sun.xml.internal.ws.api.server.Module;
 import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
 import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
 import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
--- a/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java	Thu Apr 06 17:01:03 2017 +0000
+++ b/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java	Fri Apr 07 08:05:45 2017 +0000
@@ -155,12 +155,10 @@
             }
 
             private InputStream inputStream() throws IOException {
-                java.lang.reflect.Module module = resolvingClass.getModule();
-                if (module != null) {
-                    InputStream stream = module.getResourceAsStream(path);
-                    if (stream != null) {
-                        return stream;
-                    }
+                java.lang.Module module = resolvingClass.getModule();
+                InputStream stream = module.getResourceAsStream(path);
+                if (stream != null) {
+                    return stream;
                 }
                 throw new ServerRtException("cannot.load.wsdl", path);
             }
--- a/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java	Thu Apr 06 17:01:03 2017 +0000
+++ b/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java	Fri Apr 07 08:05:45 2017 +0000
@@ -234,17 +234,15 @@
     }
 
     private static InputStream moduleResource(Class resolvingClass, String name) {
-        java.lang.reflect.Module module = resolvingClass.getModule();
-        if (module != null) {
-            try {
-                InputStream stream = module.getResourceAsStream(name);
-                if (stream != null) {
-                    return stream;
-                }
-            } catch(IOException e) {
-                throw new UtilException("util.failed.to.find.handlerchain.file",
-                        resolvingClass.getName(), name);
+        Module module = resolvingClass.getModule();
+        try {
+            InputStream stream = module.getResourceAsStream(name);
+            if (stream != null) {
+                return stream;
             }
+        } catch(IOException e) {
+            throw new UtilException("util.failed.to.find.handlerchain.file",
+                    resolvingClass.getName(), name);
         }
         return null;
     }