@Override public URI createNewPath(String newPath, boolean checkNormalization) { if (checkNormalization && URIUtils.needsNormalization(newPath)) { return new StandardURI(mScheme, mAuthority, newPath, mQuery); } return new StandardURI(this, newPath); }
@Override public URI createNewPath(String newPath, boolean checkNormalization) { if (checkNormalization && URIUtils.needsNormalization(newPath)) { // Handle schemes with two components. Pair<String, String> schemeComponents = getSchemeComponents(mFullScheme); String schemePrefix = schemeComponents.getFirst(); return new MultiPartSchemeURI(schemePrefix, mScheme, mAuthority, newPath, mQuery); } return new MultiPartSchemeURI(this, mFullScheme, newPath); }