code: @Sensitive
      protected String removeHostNameFromURL(@Sensitive String url) {
          try {
              int doubleSlash = url.indexOf("//");
              int firstSingleSlash = url.indexOf("/", doubleSlash + 2);
              URL originalURL = new URL(url);
              StringBuffer workURL = new StringBuffer();
              workURL.append(originalURL.getProtocol());
              workURL.append("://");
              int port = originalURL.getPort();
              if (port != -1) {
                  workURL.append(":");
                  workURL.append(port);
              }
              url = workURL.append(url.substring(firstSingleSlash)).toString();
          } catch (java.net.MalformedURLException e) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "removeHostNameFromURL", new Object[] { e });
              }
          }
          return url;
      }
docs: Remove only the host name from the specified URL String.
  
  @param url A valid URL string
  @return