Skip to content

Commit

Permalink
Merge pull request #37803 from mkouba/dev-mode-live-reload-null-checks
Browse files Browse the repository at this point in the history
Dev mode: add null checks to TimestampSet.isRestartNeeded()
  • Loading branch information
gsmet authored Dec 18, 2023
2 parents a66a4f1 + 3fb7924 commit e2b0e1a
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1309,12 +1309,14 @@ boolean isRestartNeeded(String changedFile) {
}
}
// Then try to match a new file that was added to a resource root
Boolean ret = watchedFilePaths.get(changedFile);
Boolean ret = watchedFilePaths != null ? watchedFilePaths.get(changedFile) : null;
if (ret == null) {
ret = false;
for (Entry<Predicate<String>, Boolean> e : watchedFilePredicates) {
if (e.getKey().test(changedFile)) {
ret = ret || e.getValue();
ret = Boolean.FALSE;
if (watchedFilePredicates != null) {
for (Entry<Predicate<String>, Boolean> e : watchedFilePredicates) {
if (e.getKey().test(changedFile)) {
ret = ret || e.getValue();
}
}
}
}
Expand Down

0 comments on commit e2b0e1a

Please sign in to comment.