@Test public void testSetQuarantineEmptyUrl() throws Exception { final QuarantineService q = new LaunchServicesQuarantineService(); q.setQuarantine(new NullLocal("/", "n"), null, null); q.setQuarantine(new NullLocal("/", "n"), StringUtils.EMPTY, StringUtils.EMPTY); }
@Override public void setQuarantine(final Local file, final String originUrl, final String dataUrl) throws LocalAccessDeniedException { if(StringUtils.isEmpty(originUrl)) { log.warn("No origin url given for quarantine"); return; } if(StringUtils.isEmpty(dataUrl)) { log.warn("No data url given for quarantine"); return; } synchronized(lock) { if(!this.setQuarantine(file.getAbsolute(), originUrl, dataUrl)) { throw new LocalAccessDeniedException(file.getAbsolute()); } } }
LaunchServicesQuarantineService implements QuarantineService { @Override public void setQuarantine(final Local file, final String originUrl, final String dataUrl) throws LocalAccessDeniedException { if(StringUtils.isEmpty(originUrl)) { log.warn("No origin url given for quarantine"); return; } if(StringUtils.isEmpty(dataUrl)) { log.warn("No data url given for quarantine"); return; } synchronized(lock) { if(!this.setQuarantine(file.getAbsolute(), originUrl, dataUrl)) { throw new LocalAccessDeniedException(file.getAbsolute()); } } } }
LaunchServicesQuarantineService implements QuarantineService { @Override public void setQuarantine(final Local file, final String originUrl, final String dataUrl) throws LocalAccessDeniedException { if(StringUtils.isEmpty(originUrl)) { log.warn("No origin url given for quarantine"); return; } if(StringUtils.isEmpty(dataUrl)) { log.warn("No data url given for quarantine"); return; } synchronized(lock) { if(!this.setQuarantine(file.getAbsolute(), originUrl, dataUrl)) { throw new LocalAccessDeniedException(file.getAbsolute()); } } }  }
LaunchServicesQuarantineService implements QuarantineService { @Override public void setQuarantine(final Local file, final String originUrl, final String dataUrl) throws LocalAccessDeniedException { if(StringUtils.isEmpty(originUrl)) { log.warn("No origin url given for quarantine"); return; } if(StringUtils.isEmpty(dataUrl)) { log.warn("No data url given for quarantine"); return; } synchronized(lock) { if(!this.setQuarantine(file.getAbsolute(), originUrl, dataUrl)) { throw new LocalAccessDeniedException(file.getAbsolute()); } } }  @Override void setQuarantine(final Local file, final String originUrl, final String dataUrl); @Override void setWhereFrom(final Local file, final String dataUrl); }
LaunchServicesQuarantineService implements QuarantineService { @Override public void setQuarantine(final Local file, final String originUrl, final String dataUrl) throws LocalAccessDeniedException { if(StringUtils.isEmpty(originUrl)) { log.warn("No origin url given for quarantine"); return; } if(StringUtils.isEmpty(dataUrl)) { log.warn("No data url given for quarantine"); return; } synchronized(lock) { if(!this.setQuarantine(file.getAbsolute(), originUrl, dataUrl)) { throw new LocalAccessDeniedException(file.getAbsolute()); } } }  @Override void setQuarantine(final Local file, final String originUrl, final String dataUrl); @Override void setWhereFrom(final Local file, final String dataUrl);  }