@Test(expected = IllegalArgumentException.class) public void test2 () throws Exception { Globals globals = new Globals (); JaqyInterpreter interpreter = new JaqyInterpreter (globals, null, null); AzurePathHandler handler = new AzurePathHandler (); handler.getPath ("asdf", interpreter); }
@Override public Path getPath (String path, JaqyInterpreter interpreter) throws IOException { AzurePathInfo info = AzureUtils.getPathInfo (path); if ("wasb".equals (info.protocol) || "wasbs".equals (info.protocol)) { CloudBlobContainer container = AzureUtils.getContainer (info.account, info.container, interpreter); try { if (!container.exists ()) { throw new IOException ("Invalid Azure path: " + path); } } catch (IOException ex) { throw ex; } catch (Exception ex) { throw new IOException (ex.getMessage (), ex); } return new WasbPath (container, info.file, interpreter); } throw new IOException ("Invalid Azure path: " + path); }
AzurePathHandler implements PathHandler { @Override public Path getPath (String path, JaqyInterpreter interpreter) throws IOException { AzurePathInfo info = AzureUtils.getPathInfo (path); if ("wasb".equals (info.protocol) || "wasbs".equals (info.protocol)) { CloudBlobContainer container = AzureUtils.getContainer (info.account, info.container, interpreter); try { if (!container.exists ()) { throw new IOException ("Invalid Azure path: " + path); } } catch (IOException ex) { throw ex; } catch (Exception ex) { throw new IOException (ex.getMessage (), ex); } return new WasbPath (container, info.file, interpreter); } throw new IOException ("Invalid Azure path: " + path); } }
AzurePathHandler implements PathHandler { @Override public Path getPath (String path, JaqyInterpreter interpreter) throws IOException { AzurePathInfo info = AzureUtils.getPathInfo (path); if ("wasb".equals (info.protocol) || "wasbs".equals (info.protocol)) { CloudBlobContainer container = AzureUtils.getContainer (info.account, info.container, interpreter); try { if (!container.exists ()) { throw new IOException ("Invalid Azure path: " + path); } } catch (IOException ex) { throw ex; } catch (Exception ex) { throw new IOException (ex.getMessage (), ex); } return new WasbPath (container, info.file, interpreter); } throw new IOException ("Invalid Azure path: " + path); }  }
AzurePathHandler implements PathHandler { @Override public Path getPath (String path, JaqyInterpreter interpreter) throws IOException { AzurePathInfo info = AzureUtils.getPathInfo (path); if ("wasb".equals (info.protocol) || "wasbs".equals (info.protocol)) { CloudBlobContainer container = AzureUtils.getContainer (info.account, info.container, interpreter); try { if (!container.exists ()) { throw new IOException ("Invalid Azure path: " + path); } } catch (IOException ex) { throw ex; } catch (Exception ex) { throw new IOException (ex.getMessage (), ex); } return new WasbPath (container, info.file, interpreter); } throw new IOException ("Invalid Azure path: " + path); }  @Override Path getPath(String path, JaqyInterpreter interpreter); @Override boolean canHandle(String path); }
AzurePathHandler implements PathHandler { @Override public Path getPath (String path, JaqyInterpreter interpreter) throws IOException { AzurePathInfo info = AzureUtils.getPathInfo (path); if ("wasb".equals (info.protocol) || "wasbs".equals (info.protocol)) { CloudBlobContainer container = AzureUtils.getContainer (info.account, info.container, interpreter); try { if (!container.exists ()) { throw new IOException ("Invalid Azure path: " + path); } } catch (IOException ex) { throw ex; } catch (Exception ex) { throw new IOException (ex.getMessage (), ex); } return new WasbPath (container, info.file, interpreter); } throw new IOException ("Invalid Azure path: " + path); }  @Override Path getPath(String path, JaqyInterpreter interpreter); @Override boolean canHandle(String path);  }