Code example for HttpsURLConnection

Methods: setHostnameVerifier

0
    } 
 
    public final void testSetHostnameVerifier() { 
        HttpsURLConnection con = new MyHttpsURLConnection(null);
        try { 
            con.setHostnameVerifier(null);
            fail("No expected IllegalArgumentException");
        } catch (IllegalArgumentException e) {
        } 
    } 
 
    public final void testGetDefaultSSLSocketFactory() { 
        SSLSocketFactory sf = HttpsURLConnection.getDefaultSSLSocketFactory();
        if (!sf.equals(SSLSocketFactory.getDefault())) {
            fail("incorrect DefaultSSLSocketFactory");
        } 
    } 
 
    public final void testGetSSLSocketFactory() { 
        HttpsURLConnection con = new MyHttpsURLConnection(null);
Contextual code suggestions in your IDE  Get Codota for Java