String (@Nullable String url) { if (StringUtil.isNotEmpty(url)) { try { final String scheme = new URI(url).getScheme(); // For URL like "foo.bar:8080" host name will be parsed as scheme if (scheme == null) { url = getDefaultScheme() + "://" + url; } } catch (URISyntaxException ignored) { } } return url; }