String (@NotNull String url, @Nullable String login) { if (login == null) { return url; } Couple<String> pair = UriUtil.splitScheme(url); String scheme = pair.getFirst(); if (!StringUtil.isEmpty(scheme)) { return scheme + URLUtil.SCHEME_SEPARATOR + login + "@" + pair.getSecond(); } return login + "@" + url; }