/src/main/java/org/htmlunit/util/UrlUtils.java
spec = sb.substring( 0 , sb.length( ) - trailing) ;
spec = sb.substring ( 0, sb.length ( ) - trailing ) ;
endIndex = spec.length() - trailing; spec = spec.substring(0, endIndex); } } else { if (trailing > 0) { <extra_id_0> } else { spec = sb.toString(); } endIndex = spec.length(); }