What is HttpsURLConnectionOldImpl ?
843811Aug 5 2002 — edited Aug 6 2002I'm implementing my own trust manager in order to use anonymous connection. I'm declaring the Sun internal SSL provider. When I try to open a URLConnection cast into a HttpsURLConnection object with the following code, I get a ClassCastException:
MySslSocketFactory xSSF = (MySslSocketFactory) MySslSocketFactory.getDefault ();
HttpsURLConnection.setDefaultSSLSocketFactory ( ( SSLSocketFactory ) xSSF );
xURL = new URL ( "https://www.changeme.com:443/" );
HttpsURLConnection xUrlConn = ( HttpsURLConnection ) xURL.openConnection ();
java.lang.ClassCastException: com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl
at com.mycompany.utils.MyAccessor.<init>(MyAccessor.java:41)
at com.mycompany.utils.MyAccessor.main(MyAccessor.java:74)
I've been studying the examples given here, what could be wrong?