private static URL safeURL ( String urlString ) throws ClassNotFoundException { try { return new URL ( urlString ) ; } catch ( MalformedURLException exception ) { throw new ClassNotFoundException ( exception . getMessage ( ) ) ; } }
Maps malformed URL exception to ClassNotFoundException