assert (repoFile != null);
return getRepositoryAdmin().getHelper().repository(repoFile.toURI().toURL());
}
private Repository updateRepository(File repoFile, File repoDir) throws Exception {
Repository repository = loadRepository(repoFile);
if (isObsoleteRepo(repository, repoFile, repoDir)) {
if (!repoFile.delete()) {
throw new IOException("Failed to delete " + repoFile.getAbsolutePath());
}
logger.logp(Level.INFO, "ObrHandler", "updateRepository", "Recreating {0}", new Object[]{repoFile});