Skip to content

Commit

Permalink
GH-1404: do not try to find property files inside non-existing source…
Browse files Browse the repository at this point in the history
… folders
  • Loading branch information
martinlippert committed Nov 12, 2024
1 parent dbaea71 commit b5fff4e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ public FuzzyMap<PropertyInfo> getIndex(IJavaProject jp) {
}

private void getIndexFromSourceFolder(File sourceFolder, SimplePropertyIndex index) {
if (!sourceFolder.exists()) {
return;
}

try (Stream<Path> walk = Files.walk(sourceFolder.toPath())) {
walk
.filter(path -> ValuePropertyReferencesProvider.isPropertiesFile(path))
Expand All @@ -132,7 +136,7 @@ else if (fileName.endsWith(".yml") || fileName.endsWith(".yaml")) {
}
});
} catch (Exception e) {
e.printStackTrace();
log.error("error getting ad-hoc property index data for: " + sourceFolder.toString(), e);
}
}

Expand Down

0 comments on commit b5fff4e

Please sign in to comment.