< prev index next >

src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java

Print this page
*** 85,12 ***
      private synchronized Node connectResourceNode() throws IOException {
          if (resourceNode == null) {
              if (module.isEmpty() || path == null) {
                  throw new IOException("cannot connect to jrt:/" + module);
              }
!             Node node = READER.findNode("/modules/" + module + "/" + path);
!             if (node == null || !node.isResource()) {
                  throw new IOException(module + "/" + path + " not found");
              }
              this.resourceNode = node;
              super.connected = true;
          }
--- 85,12 ---
      private synchronized Node connectResourceNode() throws IOException {
          if (resourceNode == null) {
              if (module.isEmpty() || path == null) {
                  throw new IOException("cannot connect to jrt:/" + module);
              }
!             Node node = READER.findResourceNode(module, path);
!             if (node == null) {
                  throw new IOException(module + "/" + path + " not found");
              }
              this.resourceNode = node;
              super.connected = true;
          }
< prev index next >