File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
opengrok-indexer/src/main/java/org/opengrok/indexer Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 4747import java .util .logging .Logger ;
4848
4949import org .apache .commons .lang3 .SystemUtils ;
50+ import org .jetbrains .annotations .Nullable ;
5051import org .opengrok .indexer .configuration .RuntimeEnvironment ;
5152import org .opengrok .indexer .index .IndexerParallelizer ;
5253import org .opengrok .indexer .logger .LoggerFactory ;
@@ -495,6 +496,7 @@ private void addTerraformSupport(List<String> command) {
495496 * @throws IOException I/O exception
496497 * @throws InterruptedException interrupted command
497498 */
499+ @ Nullable
498500 public Definitions doCtags (String file ) throws IOException , InterruptedException {
499501
500502 if (file .length () < 1 || "\n " .equals (file )) {
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ private static boolean canProcessFiles(String basePath) {
9393 Ctags ctags = new Ctags ();
9494 try {
9595 Definitions definitions = ctags .doCtags (inputPath .toString ());
96- if (definitions .numberOfSymbols () > 1 ) {
96+ if (definitions != null && definitions .numberOfSymbols () > 1 ) {
9797 return true ;
9898 }
9999 } catch (IOException | InterruptedException e ) {
You can’t perform that action at this time.
0 commit comments