diff --git a/jimfs/pom.xml b/jimfs/pom.xml
index 58a24f37..017387be 100644
--- a/jimfs/pom.xml
+++ b/jimfs/pom.xml
@@ -62,7 +62,7 @@
org.checkerframework
- checker-compat-qual
+ checker-qual
true
diff --git a/jimfs/src/main/java/com/google/common/jimfs/AbstractWatchService.java b/jimfs/src/main/java/com/google/common/jimfs/AbstractWatchService.java
index 0bf2258a..2ccaa1b2 100644
--- a/jimfs/src/main/java/com/google/common/jimfs/AbstractWatchService.java
+++ b/jimfs/src/main/java/com/google/common/jimfs/AbstractWatchService.java
@@ -42,7 +42,7 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
-import org.checkerframework.checker.nullness.compatqual.NullableDecl;
+import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Abstract implementation of {@link WatchService}. Provides the means for registering and managing
@@ -91,16 +91,14 @@ ImmutableList queuedKeys() {
return ImmutableList.copyOf(queue);
}
- @NullableDecl
@Override
- public WatchKey poll() {
+ public @Nullable WatchKey poll() {
checkOpen();
return check(queue.poll());
}
- @NullableDecl
@Override
- public WatchKey poll(long timeout, TimeUnit unit) throws InterruptedException {
+ public @Nullable WatchKey poll(long timeout, TimeUnit unit) throws InterruptedException {
checkOpen();
return check(queue.poll(timeout, unit));
}
@@ -112,8 +110,7 @@ public WatchKey take() throws InterruptedException {
}
/** Returns the given key, throwing an exception if it's the poison. */
- @NullableDecl
- private WatchKey check(@NullableDecl WatchKey key) {
+ private @Nullable WatchKey check(@Nullable WatchKey key) {
if (key == poison) {
// ensure other blocking threads get the poison
queue.offer(poison);
@@ -143,9 +140,9 @@ static final class Event implements WatchEvent {
private final Kind kind;
private final int count;
- @NullableDecl private final T context;
+ private final @Nullable T context;
- public Event(Kind kind, int count, @NullableDecl T context) {
+ public Event(Kind kind, int count, @Nullable T context) {
this.kind = checkNotNull(kind);
checkArgument(count >= 0, "count (%s) must be non-negative", count);
this.count = count;
@@ -162,9 +159,8 @@ public int count() {
return count;
}
- @NullableDecl
@Override
- public T context() {
+ public @Nullable T context() {
return context;
}
@@ -215,7 +211,7 @@ private static WatchEvent