@Test public void secureScheme() { Assert.assertTrue(URLInfo.getDefaultProtocolSecurity("wss")); Assert.assertTrue(URLInfo.getDefaultProtocolSecurity("https")); Assert.assertFalse(URLInfo.getDefaultProtocolSecurity("http")); Assert.assertFalse(URLInfo.getDefaultProtocolSecurity("ws")); }
public static boolean getDefaultProtocolSecurity(String scheme) { if (scheme == null) { throw new NullPointerException("scheme"); } return "wss".equals(scheme) || "https".equals(scheme); }
URLInfo { public static boolean getDefaultProtocolSecurity(String scheme) { if (scheme == null) { throw new NullPointerException("scheme"); } return "wss".equals(scheme) || "https".equals(scheme); } }
URLInfo { public static boolean getDefaultProtocolSecurity(String scheme) { if (scheme == null) { throw new NullPointerException("scheme"); } return "wss".equals(scheme) || "https".equals(scheme); } URLInfo(String protocol, String host,
                   int port, String path, boolean secure); }
URLInfo { public static boolean getDefaultProtocolSecurity(String scheme) { if (scheme == null) { throw new NullPointerException("scheme"); } return "wss".equals(scheme) || "https".equals(scheme); } URLInfo(String protocol, String host,
                   int port, String path, boolean secure); static int getDefaultPort(String scheme); static boolean getDefaultProtocolSecurity(String scheme); boolean getTrustAllCertificates(); static URLInfo parse(String url); static URLInfo parse(String url, Boolean secureOverride); void setTrustAllCertificates(boolean trust); }
URLInfo { public static boolean getDefaultProtocolSecurity(String scheme) { if (scheme == null) { throw new NullPointerException("scheme"); } return "wss".equals(scheme) || "https".equals(scheme); } URLInfo(String protocol, String host,
                   int port, String path, boolean secure); static int getDefaultPort(String scheme); static boolean getDefaultProtocolSecurity(String scheme); boolean getTrustAllCertificates(); static URLInfo parse(String url); static URLInfo parse(String url, Boolean secureOverride); void setTrustAllCertificates(boolean trust); final String protocol; final String host; final int port; final String path; final boolean secure; }