/src/main/java/org/htmlunit/util/UrlUtils.java
if ( ref.isEmpty ( ) || ref.charAt ( 0 ) != '#' ) { s.append ( '#' ) ; }
s.append(path); } if (query != null) { s.append('?').append(query); } if (ref != null) { <extra_id_0> s.append(ref); } return new URL(s.toString()); } private static URL createNewUrl(final String protocol, final String authority, final String path, final String ref, final String query) throws MalformedURLException {