Skip to content

Commit 973b84d

Browse files
committed
add warning about empty list of repositories
1 parent c53ee0a commit 973b84d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/HistoryGuru.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,12 @@ private void createCache(Repository repository, String sinceRevision) {
679679
}
680680

681681
private void createCacheReal(Collection<Repository> repositories) {
682+
if (repositories.isEmpty()) {
683+
LOGGER.log(Level.WARNING, "History cache is enabled however the list of repositories is empty. " +
684+
"Either specify the repositories in configuration or let the indexer scan them.");
685+
return;
686+
}
687+
682688
Statistics elapsed = new Statistics();
683689
ExecutorService executor = env.getIndexerParallelizer().getHistoryExecutor();
684690
// Since we know each repository object from the repositories

0 commit comments

Comments
 (0)