urlhost = getHost().getDnsName(); try { urlString = String.format(scheme + "://" + userInfo + urlhost + portString + file, argslist.toArray()); urlString = Util.parseTemplate(urlString, getHost(), argslist, this); } catch (IllegalFormatConversionException e) { log(Level.ERROR, "Illegal format string: %s://%s%s:%d%s, args %d", scheme, userInfo, urlhost, portString, file, argslist.size()); urlString = Util.parseTemplate(scheme + "://" + userInfo + urlhost + portString + file, this, getHost());