/** * Determine if the repository could be used as a valid destination (eg, it is modifiable) * @param repository the repository to test * @return the repository */ public static <T> IRepository<T> validDestinationRepository(IRepository<T> repository) { if (!repository.isModifiable()) throw new IllegalStateException(NLS.bind(Messages.DestinationNotModifiable, repository.getLocation())); return repository; }
/** * Determine if the repository could be used as a valid destination (eg, it is modifiable) * @param repository the repository to test * @return the repository */ public static <T> IRepository<T> validDestinationRepository(IRepository<T> repository) { if (!repository.isModifiable()) throw new IllegalStateException(NLS.bind(Messages.DestinationNotModifiable, repository.getLocation())); return repository; }