@Test public void shouldResolveURLMissingDefaultHttpsPort() throws Exception { URL url = new URL("https: assertEquals("https: }
static String asOrigin(URL url) { URI uri = URI.create(url.toString()); if ("jar".equals(uri.getScheme())) { String schemeSpecificPart = uri.getSchemeSpecificPart(); int endAt = schemeSpecificPart.indexOf("!/"); if (endAt != -1) { schemeSpecificPart = schemeSpecificPart.substring(0, endAt); } uri = URI.create(schemeSpecificPart); } if ("file".equals(uri.getScheme())) { return "null"; } String scheme = uri.getScheme(); String host = uri.getHost(); int port = uri.getPort(); return port != -1 ? format("%s: }
HttpOriginSecuritySpi { static String asOrigin(URL url) { URI uri = URI.create(url.toString()); if ("jar".equals(uri.getScheme())) { String schemeSpecificPart = uri.getSchemeSpecificPart(); int endAt = schemeSpecificPart.indexOf("!/"); if (endAt != -1) { schemeSpecificPart = schemeSpecificPart.substring(0, endAt); } uri = URI.create(schemeSpecificPart); } if ("file".equals(uri.getScheme())) { return "null"; } String scheme = uri.getScheme(); String host = uri.getHost(); int port = uri.getPort(); return port != -1 ? format("%s: } }
HttpOriginSecuritySpi { static String asOrigin(URL url) { URI uri = URI.create(url.toString()); if ("jar".equals(uri.getScheme())) { String schemeSpecificPart = uri.getSchemeSpecificPart(); int endAt = schemeSpecificPart.indexOf("!/"); if (endAt != -1) { schemeSpecificPart = schemeSpecificPart.substring(0, endAt); } uri = URI.create(schemeSpecificPart); } if ("file".equals(uri.getScheme())) { return "null"; } String scheme = uri.getScheme(); String host = uri.getHost(); int port = uri.getPort(); return port != -1 ? format("%s: }  }
HttpOriginSecuritySpi { static String asOrigin(URL url) { URI uri = URI.create(url.toString()); if ("jar".equals(uri.getScheme())) { String schemeSpecificPart = uri.getSchemeSpecificPart(); int endAt = schemeSpecificPart.indexOf("!/"); if (endAt != -1) { schemeSpecificPart = schemeSpecificPart.substring(0, endAt); } uri = URI.create(schemeSpecificPart); } if ("file".equals(uri.getScheme())) { return "null"; } String scheme = uri.getScheme(); String host = uri.getHost(); int port = uri.getPort(); return port != -1 ? format("%s: }  static HttpOriginSecuritySpi newInstance(); @IgnoreJRERequirement final HttpURLConnection openConnection(URL url); final Socket createSocket(URL url); static final String getOrigin(); }
HttpOriginSecuritySpi { static String asOrigin(URL url) { URI uri = URI.create(url.toString()); if ("jar".equals(uri.getScheme())) { String schemeSpecificPart = uri.getSchemeSpecificPart(); int endAt = schemeSpecificPart.indexOf("!/"); if (endAt != -1) { schemeSpecificPart = schemeSpecificPart.substring(0, endAt); } uri = URI.create(schemeSpecificPart); } if ("file".equals(uri.getScheme())) { return "null"; } String scheme = uri.getScheme(); String host = uri.getHost(); int port = uri.getPort(); return port != -1 ? format("%s: }  static HttpOriginSecuritySpi newInstance(); @IgnoreJRERequirement final HttpURLConnection openConnection(URL url); final Socket createSocket(URL url); static final String getOrigin();  }