Here you can find the source of makeUrl(String url)
Parameter | Description |
---|---|
RuntimeException | to rethrow MalformedURLException |
public static URL makeUrl(String url)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import java.net.MalformedURLException; import java.net.URL; public class Main { /**/*from w w w . j a v a 2s.com*/ * Creates a URL instance. * * @throws RuntimeException to rethrow {@link MalformedURLException} */ public static URL makeUrl(String url) { try { return new URL(url); } catch (MalformedURLException e) { throw new RuntimeException(e); } } }