code: public static URL getUrl(String url) {
      try {
        return new URL(url);
      } catch (MalformedURLException e) {
        throw new RuntimeException(e);
      }
    }
docs: Create a URL object from a string. Helper method that turns
  the {@code MalformedURLException} into a {@code RuntimeException}.
  @since 4.0