Skip to content

Commit 3ade460

Browse files
committed
Fixed null annotations
1 parent e881010 commit 3ade460

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/engineering/swat/watch/impl/overflows/IndexingRescanner.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545
import org.apache.logging.log4j.LogManager;
4646
import org.apache.logging.log4j.Logger;
47+
import org.checkerframework.checker.nullness.qual.NonNull;
4748
import org.checkerframework.checker.nullness.qual.Nullable;
4849

4950
import engineering.swat.watch.WatchEvent;
@@ -59,7 +60,7 @@ public IndexingRescanner(Executor exec, Path path, WatchScope scope) {
5960
new Indexer(path, scope).walkFileTree(); // Make an initial scan to populate the index
6061
}
6162

62-
private static class PathMap<V> {
63+
private static class PathMap<V extends @NonNull Object > {
6364
private final Map<Path, Map<Path, V>> values = new ConcurrentHashMap<>();
6465
// ^^^^ ^^^^
6566
// Parent File name (regular file or directory)
@@ -85,7 +86,7 @@ public Set<Path> getFileNames(Path parent) {
8586
return apply(this::remove, p);
8687
}
8788

88-
private static <V> @Nullable V apply(BiFunction<Path, Path, @Nullable V> action, Path p) {
89+
private static <V extends @Nullable Object> V apply(BiFunction<Path, Path, V> action, Path p) {
8990
var parent = p.getParent();
9091
var fileName = p.getFileName();
9192
if (parent != null && fileName != null) {

0 commit comments

Comments
 (0)