// handle the deprecated sun case and other possible hidden API's
// that are similar to the Sun cases
try {
Method method = connection.getClass().getMethod("getHostnameVerifier");
InvocationHandler handler = new ReflectionInvokationHandler(verifier) {
public Object invoke(Object proxy,
Method method,
Object[] args) throws Throwable {
try {
return super.invoke(proxy, method, args);