text: public static Proxy proxyFor(ProxySelector proxySelector, URL u)throws ConnectException {try {URI uri = new URI(u.getProtocol(), null, u.getHost(), u.getPort(),null, null, null);return proxySelector.select(uri).get(0);} catch (URISyntaxException e) {final ConnectException err;err = new ConnectException(MessageFormat.format(JGitText.get().cannotDetermineProxyFor, u));err.initCause(e);throw err;}}