@Test(expected = IllegalArgumentException.class) public void testCreateUploaderBadProduct() { SftpUploader.createUploader(mock(FtpProduct.class)); }
public static Uploader createUploader(final FtpProduct product) { if (product == null) throw new NullPointerException("Product cannot be null."); if (!(product instanceof UserPassProduct) && !(product instanceof KeyCryptoProduct)) throw new IllegalArgumentException("Invalid product type: " + product.getClass()); return new JschUploader(JschSftpProcessor.getProcessor(product)); }
SftpUploader { public static Uploader createUploader(final FtpProduct product) { if (product == null) throw new NullPointerException("Product cannot be null."); if (!(product instanceof UserPassProduct) && !(product instanceof KeyCryptoProduct)) throw new IllegalArgumentException("Invalid product type: " + product.getClass()); return new JschUploader(JschSftpProcessor.getProcessor(product)); } }
SftpUploader { public static Uploader createUploader(final FtpProduct product) { if (product == null) throw new NullPointerException("Product cannot be null."); if (!(product instanceof UserPassProduct) && !(product instanceof KeyCryptoProduct)) throw new IllegalArgumentException("Invalid product type: " + product.getClass()); return new JschUploader(JschSftpProcessor.getProcessor(product)); } private  SftpUploader(); }
SftpUploader { public static Uploader createUploader(final FtpProduct product) { if (product == null) throw new NullPointerException("Product cannot be null."); if (!(product instanceof UserPassProduct) && !(product instanceof KeyCryptoProduct)) throw new IllegalArgumentException("Invalid product type: " + product.getClass()); return new JschUploader(JschSftpProcessor.getProcessor(product)); } private  SftpUploader(); static Uploader createUploader(final FtpProduct product); @Deprecated static KeyCryptoBuilder getKeyCryptoBuilder(); @Deprecated static UserPassBuilder getUserPassBuilder(); }
SftpUploader { public static Uploader createUploader(final FtpProduct product) { if (product == null) throw new NullPointerException("Product cannot be null."); if (!(product instanceof UserPassProduct) && !(product instanceof KeyCryptoProduct)) throw new IllegalArgumentException("Invalid product type: " + product.getClass()); return new JschUploader(JschSftpProcessor.getProcessor(product)); } private  SftpUploader(); static Uploader createUploader(final FtpProduct product); @Deprecated static KeyCryptoBuilder getKeyCryptoBuilder(); @Deprecated static UserPassBuilder getUserPassBuilder();  }