/src/main/java/org/htmlunit/util/UrlUtils.java
if ( ( ( path == null) || ( path.isEmpty( ) ) ) || ( ( path.charAt( 0) ) != '/') ) {   buffer.append( '/') ; }
[Delete]
s.append(path); } if (query != null) { s.append('?').append(query); } if (ref != null) { <extra_id_0> s.append('#'); } s.append(ref); } return new URL(s.toString()); }