/** * Replace any hostname requirements with the supplied hostname. * * @param hostname the hostname to use as a requirement * @return {@code this}. */ @NonNull public GitURIRequirementsBuilder withHostname(@CheckForNull String hostname) { return withHostnamePort(hostname, -1); }
withPath(matcher.group(7)); if (matcher.group(5) != null) { withHostnamePort(matcher.group(4), Integer.parseInt(matcher.group(5))); } else { withHostname(matcher.group(4)).withoutHostnamePort(); return withScheme("ssh").withPath(matcher.group(4)).withHostnamePort(matcher.group(3),22); return withScheme("ssh").withPath(matcher.group(4)).withHostnamePort(matcher.group(3),22);