in src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java [2355:2384]
protected void setURI() {
// set _uri
StringBuilder buf = new StringBuilder();
// ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
if (_scheme != null) {
buf.append(_scheme);
buf.append(':');
}
if (_is_net_path) {
buf.append("//");
if (_authority != null) { // has_authority
buf.append(_authority);
}
}
if (_opaque != null && _is_opaque_part) {
buf.append(_opaque);
} else if (_path != null) {
// _is_hier_part or _is_relativeURI
if (_path.length != 0) {
buf.append(_path);
}
}
if (_query != null) { // has_query
buf.append('?');
buf.append(_query);
}
// ignore the fragment identifier
_uri = buf.toString().toCharArray();
hash = 0;
}