private URI createUri() { String address = getAddress(); if(address.startsWith("http://") || address.startsWith("https://")) { return URI.create(address); } String arr[] = StringUtils.splitLast(address, ':'); String host; int port = 80; if(arr == null) { host = address; } else { host = arr[0]; port = Integer.parseInt(arr[1]); } try { return new URI("http", null, host, port, null, null, null); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } }