The USERINFO_PATTERN in UriComponentsBuilder was updated a while ago to ignore other hierarchical components such as path, query, and fragment, but it should do so only for those in order to be consistent with the syntax from RFC 3986, section 3.2 and also with HierarchicalUriComponents.Type.USER_INFO, which follows that syntax.