/** * Parse the given url string and store all the extracted * information in a {@code RepositoryUrl} * * @param url to parse * @return filled with the information from the given URL * @throws ScmException */ private RepositoryUrl parseUrl( String url ) throws ScmException { RepositoryUrl repoUrl = new RepositoryUrl(); url = parseProtocol( repoUrl, url ); url = parseUserInfo( repoUrl, url ); url = parseHostAndPort( repoUrl, url ); // the rest of the url must be the path to the repository on the server repoUrl.setPath( url ); return repoUrl; }
/** * Parse the given url string and store all the extracted * information in a {@code RepositoryUrl} * * @param url to parse * @return filled with the information from the given URL * @throws ScmException */ private RepositoryUrl parseUrl( String url ) throws ScmException { RepositoryUrl repoUrl = new RepositoryUrl(); url = parseProtocol( repoUrl, url ); url = parseUserInfo( repoUrl, url ); url = parseHostAndPort( repoUrl, url ); // the rest of the url must be the path to the repository on the server repoUrl.setPath( url ); return repoUrl; }