[Jersey] SSLContext not necessary any more for common HTTPS urls (, for example)?

From: Jianbao (Jim) Tao <"Jianbao>
Date: Sat, 30 Aug 2014 21:08:43 -0400


I used the following groovy code to check how to use Jersey client to
access HTTPS urls:

    void "check https url"() {
        String url = ''
        Client client = ClientBuilder.newClient()
        Response response =
        assert response.status == 200

        String text = response.readEntity( String )
        assert text.contains('<title>CHASE Bank - Credit Cards, Mortgage,
Personal & Commercial Banking')

Surprisingly, the test passed. I was thinking I might have to set up an
SSLContext instance, but apparently I don't have to. So, what is happening
behind the scene? Does Jersey automatically create an SSL context from the
JRE cacerts file for HTTPS urls?

In any case, I am very curious to know what's happening. Thank you.