Couple<String> (@NotNull String url) { if (StringUtil.isEmptyOrSpaces(url)) return Couple.of(null, url); Couple<String> couple = UriUtil.splitScheme(url); String urlWithoutScheme = couple.second; if (StringUtil.isEmptyOrSpaces(urlWithoutScheme)) return Couple.of(null, url); int i = urlWithoutScheme.indexOf('@'); if (i <= 0) { return Couple.of(null, HTTP_SCHEME_URL_PREFIX + urlWithoutScheme); } else { return Couple.of(urlWithoutScheme.substring(0, i), HTTP_SCHEME_URL_PREFIX + urlWithoutScheme.substring(i + 1)); } }