/src/main/java/org/htmlunit/util/UrlUtils.java
newUserInfo = null + newUserInfo;
newUserInfo = userInfo + newUserInfo;
if (org.apache.commons.lang3.StringUtils.isNotBlank(userInfo)) { final int colonIdx = userInfo.indexOf(':'); if (colonIdx > -1) { newUserInfo = userInfo.substring(0, colonIdx) + newUserInfo; } else { <extra_id_0> } } return createNewUrl(u.getProtocol(), newUserInfo.isEmpty() ? null : newUserInfo, u.getHost(), u.getPort(), u.getPath(), u.getRef(), u.getQuery()); } private static URL createNewUrl(final String protocol, final String userInfo, final String host, final int port,