File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
opengrok-indexer/src/main/java/org/opengrok/indexer/configuration Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 23
23
*/
24
24
package org .opengrok .indexer .configuration ;
25
25
26
+ import static java .lang .Integer .max ;
26
27
import static org .opengrok .indexer .configuration .Configuration .makeXMLStringAsConfiguration ;
27
28
import static org .opengrok .indexer .index .IndexerUtil .getWebAppHeaders ;
28
29
@@ -1177,7 +1178,7 @@ public int getIndexingParallelism() {
1177
1178
*/
1178
1179
public int getRepositoryInvalidationParallelism () {
1179
1180
int parallelism = syncReadConfiguration (Configuration ::getRepositoryInvalidationParallelism );
1180
- return parallelism < 1 ? (Runtime .getRuntime ().availableProcessors () / 2 ) : parallelism ;
1181
+ return parallelism < 1 ? max (Runtime .getRuntime ().availableProcessors () / 2 , 1 ) : parallelism ;
1181
1182
}
1182
1183
1183
1184
/**
You can’t perform that action at this time.
0 commit comments