/** Try to locate a local URL representing the incoming path. The first attempt * assumes that the incoming path is an actual URL string (file://, etc). If this * does not work, then the next attempts try to locate this UURL as a java system * resource. * * @param path The path representing the config location. * @return An appropriate URL or null. */ public static final URL locateConfig(final String path) { try { return new URL(path); } catch(MalformedURLException e) { return findAsResource(path); } }
/** Try to locate a local URL representing the incoming path. The first attempt * assumes that the incoming path is an actual URL string (file://, etc). If this * does not work, then the next attempts try to locate this UURL as a java system * resource. * * @param path The path representing the config location. * @return An appropriate URL or null. */ public static final URL locateConfig(final String path) { try { return new URL(path); } catch(MalformedURLException e) { return findAsResource(path); } }