private static URL validateStoreURL(final String storePath) throws Exception { assert storePath != null; // First see if this is a URL try { return new URL(storePath); } catch (MalformedURLException e) { File file = new File(storePath); if (file.exists() == true && file.isFile()) { return file.toURI().toURL(); } else { URL url = findResource(storePath); if (url != null) { return url; } } } throw new Exception("Failed to find a store at " + storePath); }
private static URL validateStoreURL(final String storePath) throws Exception { assert storePath != null; // First see if this is a URL try { return new URL(storePath); } catch (MalformedURLException e) { File file = new File(storePath); if (file.exists() == true && file.isFile()) { return file.toURI().toURL(); } else { URL url = findResource(storePath); if (url != null) { return url; } } } throw new Exception("Failed to find a store at " + storePath); }
private static URL validateStoreURL(final String storePath) throws Exception { assert storePath != null; // First see if this is a URL try { return new URL(storePath); } catch (MalformedURLException e) { File file = new File(storePath); if (file.exists() == true && file.isFile()) { return file.toURI().toURL(); } else { URL url = findResource(storePath); if (url != null) { return url; } } } throw new Exception("Failed to find a store at " + storePath); }
private static URL validateStoreURL(final String storePath) throws Exception { assert storePath != null; // First see if this is a URL try { return new URL(storePath); } catch (MalformedURLException e) { File file = new File(storePath); if (file.exists() == true && file.isFile()) { return file.toURI().toURL(); } else { URL url = findResource(storePath); if (url != null) { return url; } } } throw new Exception("Failed to find a store at " + storePath); }
private static URL validateStoreURL(final String storePath) throws Exception { assert storePath != null; // First see if this is a URL try { return new URL(storePath); } catch (MalformedURLException e) { File file = new File(storePath); if (file.exists() == true && file.isFile()) { return file.toURI().toURL(); } else { URL url = findResource(storePath); if (url != null) { return url; } } } throw new Exception("Failed to find a store at " + storePath); }
private static URL validateStoreURL(final String storePath) throws Exception { assert storePath != null; // First see if this is a URL try { return new URL(storePath); } catch (MalformedURLException e) { File file = new File(storePath); if (file.exists() == true && file.isFile()) { return file.toURI().toURL(); } else { URL url = findResource(storePath); if (url != null) { return url; } } } throw new Exception("Failed to find a store at " + storePath); }
private static URL validateStoreURL(final String storePath) throws Exception { assert storePath != null; // First see if this is a URL try { return new URL(storePath); } catch (MalformedURLException e) { File file = new File(storePath); if (file.exists() == true && file.isFile()) { return file.toURI().toURL(); } else { URL url = findResource(storePath); if (url != null) { return url; } } } throw new Exception("Failed to find a store at " + storePath); }